Apple's website claims that the resolution is 1080p: 1920 x 1080
However, the launch screen required by Xcode (8.0 GM launched today) is 2208 x 1242.
Who's right?
Apple's website claims that the resolution is 1080p: 1920 x 1080
However, the launch screen required by Xcode (8.0 GM launched today) is 2208 x 1242.
Who's right?
Even if I don't generally like the tone of John Gruber's Daring Fireball blog, his Larger iPhone Display Conjecture is well worth the read.
He guessed but got exactly right both the resolution in points and in pixels for both models, except that he did not (me neither) expect Apple to build a smaller resolution physical display and scale down (details are in @Tommy's answer).
The gist of it all is that one should stop thinking in terms of pixels and start thinking in terms of points (this has been the case for quite some time, it's not a recent invention) and resulting physical size of UI elements. In short, both new iPhone models improve in this regard as physically most elements remain the same size, you can just fit more of them on the screen (for each bigger screen you can fit more).
I'm just slightly disappointed they haven't kept mapping of internal resolution to actual screen resolution 1:1 for the bigger model.
For those like me who wonder how legacy apps are treated, I did a bit of testing and computation on the subject.
Thanks to @hannes-sverrisson hint, I started on the assumption that a legacy app is treated with a 320x568 view in iPhone 6 and iPhone 6 plus.
The test was made with a simple black background
bg@2x.png
with a white border. The background has a size of 640x1136 pixels, and it is black with an inner white border of 1 pixel.Below are the screenshots provided by the simulator:
On the iPhone 6 screenshot, we can see a 1 pixel margin on top and bottom of the white border, and a 2 pixel margin on the iPhone 6 plus screenshot. This gives us a used space of 1242x2204 on iPhone 6 plus, instead of 1242x2208, and 750x1332 on the iPhone 6, instead of 750x1334.
We can assume that those dead pixels are meant to respect the iPhone 5 aspect ratio:
Second, it is important to know that @2x resources will be scaled not only on iPhone 6 plus (which expects @3x assets), but also on iPhone 6. This is probably because not scaling the resources would have led to unexpected layouts, due to the enlargement of the view.
However, that scaling is not equivalent in width and height. I tried it with a 264x264 @2x resource. Given the results, I have to assume that the scaling is directly proportional to the pixels / points ratio.
It's important to note the iPhone 6 scaling is not the same in width and height (309x310). This tends to confirm the above theory that scaling is not proportional in width and height, but uses the pixels / points ratio.
I hope this helps.
You should probably stop using launch images in iOS 8 and use a storyboard or nib/xib.
In Xcode 6, open the
File
menu and chooseNew
⟶File...
⟶iOS
⟶User Interface
⟶Launch Screen
.Then open the settings for your project by clicking on it.
In the
General
tab, in the section calledApp Icons and Launch Images
, set theLaunch Screen File
to the files you just created (this will setUILaunchStoryboardName
ininfo.plist
).Note that for the time being the simulator will only show a black screen, so you need to test on a real device.
Adding a Launch Screen xib file to your project:
Configuring your project to use the Launch Screen xib file instead of the Asset Catalog:
Real/physical iPhone 6 Plus resolution is 1920x1080 but in Xcode you make your interface for 2208x1242 resolution (736x414 points) and on device it is automatically scaled down to 1920x1080 pixels.
iPhone resolutions quick reference:
On the physical device, iPhone 6 Plus's main screen's bounds is 2208x1242 and nativeBounds is 1920x1080. There is hardware scaling involved to resize to the physical display.
On the simulator, the iPhone 6 Plus's main screen's bounds and nativeBounds are both 2208x1242.
In other words... Videos, OpenGL, and other things based on
CALayers
that deal with pixels will deal with the real 1920x1080 frame buffer on device (or 2208x1242 on sim). Things dealing with points inUIKit
will be deal with the 2208x1242 (x3) bounds and get scaled as appropriate on device.The simulator does not have access to the same hardware that is doing the scaling on device and there's not really much of a benefit to simulating it in software as they'd produce different results than the hardware. Thus it makes sense to set the
nativeBounds
of a simulated device's main screen to the bounds of the physical device's main screen.iOS 8 added API to
UIScreen
(nativeScale
andnativeBounds
) to let a developer determine the resolution of theCADisplay
corresponding to theUIScreen
.Check out this infographic: http://www.paintcodeapp.com/news/iphone-6-screens-demystified
It explains the differences between old iPhones, iPhone 6 and iPhone 6 Plus. You can see comparison of screen sizes in points, rendered pixels and physical pixels. You will also find answer to your question there:
Update:
There is an updated version of infographic mentioned above. It contains more detailed info about screen resolution differences and it covers all iPhone models so far, including 4 inch devices.
http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions