IPhone 6, iOS 8.1 reports 320x568 screen points on the device, but 375x667 on Simulator

I am using iOS 8.1, Xcode 6.1 on both devices and simulators.

NSLog(@"SCREEN (%ix %i) SCALE: %i", (int)[UIScreen mainScreen].bounds.size.width, (int)[UIScreen mainScreen].bounds.size.height, (int)[UIScreen mainScreen].scale); 

Result on the device: SCREEN (320 x 568) SCALE: 2

Simulator Result: SCREEN (375 x 667) SCALE: 2

I used the Asset Catalog, the default image for iPhone 6 (750x1334px) is displayed correctly on Simulator, but again iPhone 5 one (640x1136px) is displayed on the device.

PS. iPhpne 6 Plus works great on both devices and simulators, reports SCREEN (414 x 736) SCALE: 3, which is correct.

My application should use accurate images and layouts for all design devices. What am I doing wrong?

+5
source share
2 answers

Maybe when you made the settings for your new iPhone, did you choose the ZOOM mode for the device?

+7
source

Please note that there are two ZOOM methods on iPhone:
1) The one that relates to this problem is located at: "Settings - Screen and Brightness - View" and set to "Standard" to disable Zoom.
2) Another option: "Settings - General - Accessibility - Scale" is not relevant to this problem.

0
source

Source: https://habr.com/ru/post/1207383/


All Articles