There were many articles written and questions asked about iPhone 6 and iPhone 6 Plus screen sizes. This article provides a great explanation.
However, I am confused when testing my app in the simulator.
I have the following code in AppDelegate
.
- (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
{
UIScreen *screen = [UIScreen mainScreen];
NSLog(@"Screen width %.0f px, height %.0f px, scale %.1fx",
(double) screen.bounds.size.width,
(double) screen.bounds.size.height,
(double) screen.scale);
return YES;
}
I get the following results from iOS simulator for various devices:
iPhone 4S: Screen width 320 px, height 480 px, scale 2.0x
iPhone 5: Screen width 320 px, height 568 px, scale 2.0x
iPhone 5S: Screen width 320 px, height 568 px, scale 2.0x
iPhone 6: Screen width 320 px, height 568 px, scale 2.0x
iPhone 6 Plus: Screen width 320 px, height 568 px, scale 2.0x
The results are fine for iPhone 4S, iPhone 5 and iPhone 5S. However, I expect larger screen size for iPhone 6 and iPhone 6 Plus and I also expect scale 3.0 for iPhone 6 Plus. What is wrong?
Thanks for explanation.