resolution and pixels
Validated by the new Xcode6 simulator (with a resolution of PT, Pixel true pixel):
- IPhone5 resolution 320x568, Pixel 640x1136,@2x
- IPhone6 resolution 375x667, Pixel 750x1334,@2x
- IPhone6 Plus resolution 414x736, Pixel 1242x2208,@3x, (note that after rendering at this resolution, the image is reduced pixel resolution to 1080p (1080x1920))
Paintcode did a few diagrams to explain the very clear
Automatic adaptation
Do not process when automatically equal than stretched, if the old project print screen frame, still is320x568
Compare the automatically adapted and perfectly adapted navigation bar to see the problem:
Because stretching so there will be some virtual, the navigation bar is significantly larger than 64, but compared to 3.5-inch to 4-inch left black edge is still much better. How do I turn off the auto-fit formula? This is still the old idea, change the starting chart:
In addition to changing the start diagram, you have to say that the new Xcode can be used xib
to set the start diagram:
However, this xib can not be associated with any code (can not customize the view of the class, not Iboutlet, cannot add object), it is understood that this xib is a piece, the benefit of this scheme is that you can use to the Size Classes
different screen layout of this xib (interested can see "Size classes")
About manual adaptation
As long as you manually specify the start diagram or that xib, the screen resolution has become the size of the old code all about writing dead frame value of the code is unlucky, if you go to manual adaptation will be all appropriate, it is recommended to find a viable solution before you do not modify , The automatic adaptation scheme also does not affect the use.
In the face of 4-resolution iphone, it is recommended to use the Auto Layout
layout + Image Assets
Manage image + (Xib+storyboard) of each resolution to Interface Builder
build the UI, the Size Classes
performance of the low-version iOS system is unknown. If you want this manual adaptation, at least your project needs to be deployed in the ios6+, not the AutoLayout layout will die pretty miserable.
About XCODE6
- The simulator path is replaced by the
~/Library/Developer/CoreSimulator/Devices/
- Xcode6 can not find iOS6 simulator, it is time to persuade everyone to give up ios7-
- Submit App Store now mandatory to support 64-bit, it is time to comb through all dependent third-party LIB, updated to 64-bit
One more thing ... According to the law of the life ...
iPhone6
iPhone6+
iPhone6++
iPhone6#
?
IPhone6 resolution and adaptation