iPhone6 ​​resolution and adaptation

iPhone6 ​​resolution and adaptation

Resolution and pixels

Verified by the new Xcode6 simulator (resolution is pt, pixels are real pixels):

  1. iPhone5 resolution 320x568, pixels 640x1136, @2x
  2. iPhone6 ​​resolution 375x667, pixels 750x1334, @2x
  3. iPhone6 ​​Plus resolution 414x736, pixels 1242x2208, @3x (note that after rendering at this resolution, the image pixel resolution is proportionally reduced to 1080p (1080x1920))

PaintCode made several pictures to explain it very clearly.

Automatic adaptation

If not processed, it will be automatically stretched in equal proportions. If you print the screen frame in the old project, it will still be 320x568
Comparing the automatically adapted and *** adapted navigation bars, you can see the problem:

Because of the stretching, there will be some blur. The navigation bar is obviously larger than 64, but it is still much better than the 3.5-inch to 4-inch black border.
How to turn off the automatic adaptation solution? This is still the old idea, change the startup image:

In addition to changing the startup image, I have to say that you can use a xib to set the startup image in the new Xcode:

However, this xib cannot be associated with any code (cannot customize the View Class, cannot IBOutlet, cannot add Object), which can be understood as this xib is a screenshot. The advantage of this solution is that Size Classes can be used to layout this xib for different screens (if interested, you can read "Introduction to Size Classes")

About manual adaptation

As long as you manually specify the startup image or the xib, the screen resolution will become the expected size. All the codes in the old code that hard-code the frame value will be out of luck. If you adapt manually, you have to adapt everything. It is recommended not to make any changes before finding a feasible solution . The automatic adaptation solution does not affect the usage.

Facing iPhones with 4 resolutions, it is recommended to use Auto Layout + Image Assets to manage images of different resolutions + Interface Builder (xib+storyboard) to build UI. The performance of Size Classes in lower versions of iOS is unknown. If you want this manual adaptation solution, at least your project needs to be deployed on iOS6+. If you don't use AutoLayout, you will die miserably.

About Xcode 6

  1. The simulator path has been changed ~/Library/Developer/CoreSimulator/Devices/
  2. There is no iOS6 simulator in xcode6 anymore. It's time to convince everyone to give up iOS7-
  3. From now on, it is mandatory to support 64-bit when submitting to the App Store. It is time to sort out all the dependent third-party libs and update them to 64-bit

<<:  Android image smooth scrolling component Glide

>>:  Microsoft complains about Android phones: Stuck in the air

Recommend

As the temperature drops, please be careful of fire!

Cold winter Hand warmer, this "winter magic ...

How to do Taobao customer promotion now?

Friends who are familiar with online store operat...

From air ticket bundling to child abuse, Ctrip betrays its values

Recently, two videos circulated online, showing t...

Why don’t brands tell stories in their advertisements nowadays?

From the perspective of viewing experience, the a...

What kind of methodology can continuously create popular marketing products?

For most marketers, screen swiping is something t...

The iPhone 6s's camera is no longer the king of mobile photography

Apple's iPhone series has brought many new mo...

OPPO App Store non-standard advertising process

1. Delivery Process 1. CP regular operation activ...

Jack Trading Academy JTA Professional Harmonic Patterns

Jack Trading Academy JTA Professional Harmonic Pa...

How to run a complete event?

1. Understanding Event Operations Activity operat...

Can the human body be directly exposed to space?

With the development of aerospace technology, Chi...

There are actually people who are "barbecuing" with their lives?

How big is the imagination of foodies? recently A...