IPhone6 resolution and adaptation

Source: Internet
Author: User

resolution and pixels

Validated by the new Xcode6 simulator (with a resolution of PT, Pixel true pixel):

    1. IPhone5 resolution 320x568, Pixel 640x1136,@2x
    2. IPhone6 resolution 375x667, Pixel 750x1334,@2x
    3. 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
    1. The simulator path is replaced by the~/Library/Developer/CoreSimulator/Devices/
    2. Xcode6 can not find iOS6 simulator, it is time to persuade everyone to give up ios7-
    3. 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 ...

iPhone6iPhone6+ iPhone6++ iPhone6# ?

IPhone6 resolution and adaptation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.