Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone 6, iOS 8.1 reports 320x568 points screen on Device, but 375x667 on Simulator

I'm using iOS 8.1, Xcode 6.1 on both Device and Simulator.

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

Result on Device: SCREEN (320 x 568) SCALE: 2

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

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

PS. iPhpne 6 Plus works perfectly on both Device and Simulator reporting SCREEN (414 x 736) SCALE: 3, which is correct.

My app should use the exact images and layouts for all devices by design. What am I doing wrong?

like image 435
Grigoriy Uskov Avatar asked Nov 21 '14 09:11

Grigoriy Uskov


2 Answers

May be when you made setup for your new iPhone you chose ZOOM mode for device?

like image 50
nerowolfe Avatar answered Nov 15 '22 05:11

nerowolfe


Note that there are two ways to ZOOM on the iPhone:
1) The one relevant to this issue is at: "Settings - Display & Brightness - View" and set to "Standard" to turn off the Zoom.
2) Another one at: "Settings - General - Accessibility - Zoom" is not relevant to this issue.

like image 32
Cortado-J Avatar answered Nov 15 '22 04:11

Cortado-J