ios - Find device type iPhone 4 or iPhone5 not working -
this question has answer here:
- how detect iphone 5 (widescreen devices)? 24 answers
if(ui_user_interface_idiom() == uiuserinterfaceidiomphone){ cgsize result = [[uiscreen mainscreen] bounds].size; //nslog(@"phonesize%@",result); if(result.height > 500){ nslog(@"iphone 5"); } else{ nslog(@"iphone 4"); } }
my mac os 10.7.2 , xcode 4.5.2.i used above code find device iphone 4 or iphone 5 giving iphone4 when uses iphone5.i did set launch image , icon image. there else missed out?
make sure have png file named default-568h@2x.png
in project.
Comments
Post a Comment