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
Post a Comment