ios - iPhone6 screen size returns 375 on simulator -


my project has launch images iphones ios7,ios8.

anyway keeps returning wrong value screen width in simulator:

   nslog(@"%f",[uiscreen mainscreen].bounds.size.width);     nslog(@"%f",self.view.frame.size.width); 

both 375.0.

what missing ?

the actual screen size of iphone6 750 pixels, ios not return pixel size in frame or bounds, point size!

if want know how many pixels in point have use [uiscreen mainscreen].scale .

for iphone6plus more complicated since introduces 'native scale'. drawn larger image , reduced down 1920x1080 screen iphone 6 has. use [uiscreen mainscreen].nativescale [careful, native scale available on ios8 , app crash if use on ios.]

p.s. if not using splash image (other -568h@2x), 320x568 iphone 6 , 6+.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -