iPhone 6 (Plus) screen size

Cimlman picture Cimlman · Dec 3, 2014 · Viewed 34k times · Source

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.

Answer

Fahri Azimov picture Fahri Azimov · Dec 3, 2014

It seems like you didn't provide correct launch images to your app. When there is no correct launch images set, the app will run like on iPhone 5/5S, that's why you are having these confusing results while logging. iPhone 6 screen size is 375x667 px scale x2, iPhone 6+ 414x736 px scale x3. So, if you want to set launch image for iPhone 6 it should have 750x1334 px size, and 1242x2208 for iPhone 6+ respectively. Good Luck!

EDIT:

As rmaddy mentioned in the comments, it's better to use launch screen storyboard with proper layout constraints to fit all screens, than having bunch of images for all screens(which also increases the app size).