ocean
ocean

Reputation: 161

Why in XCode 7 iPhone 6 plus simulator's [UIScreen mainScreen] size and scale return different value with real devce?

After upgrading to xcode 7, I found a strange problem. When I call [[UIScreen mainScreen] scale] on iPhone6+ simulator, it returns 3.0, but it returns 2.0 on iPhone 6+ real device.

Is this a bug or it will also return 3.0 on iPhone 6s+ real device? since I haven't got the real iPhone 6s+, cannot test it yet.

PS. If I don't set "App Icons and Launch Images"->"Launch Screen File", [[UIScreen mainScreen] bounds].size will return 320x480, but if set "Launch Screen File", it will return 414x736, is there any documents for this problem?

Upvotes: 1

Views: 1064

Answers (1)

onmyway133
onmyway133

Reputation: 48185

Take a look at my note https://github.com/onmyway133/blog/issues/59

See this for a whole list of devices and their scale factors https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions

The iPhone 6 and 6+ introduced display mode https://www.cnet.com/how-to/explaining-display-zoom-on-iphone-6-and-6-plus/

You can see that currently the iPhone 6+, 6s+, 7+ phones have scale factor of 2.88 in zoomed mode, and 2.6 in standard mode

You can also see that in zoomed mode, iPhone 6 has the same logical size as the iPhone 5

Upvotes: 0

Related Questions