Handle UI in all iPhones with different scaling/re

2019-04-29 12:52发布

问题:

This question already has an answer here:

  • Make iOS application compatible with iPhone6 and iPhone6+ sizes [closed] 1 answer

What is the best approach to handle iPhone4, iPhone5, iPhone6, iPhone6+ UI Screens in iOS?

  • Size for iPhone 6+ with @3x scaling, Coordinate space: 414 x 736 pixels
  • Size for iPhone 6 with @2x scaling, Coordinate space: 375 x 667 pixels

回答1:

I think this question is already answered here

You just need to use new Xcode 6 Gold master and it will scale your screen for both new sizes.
With that their are several new options in new Xcode 6 if you creating new application, some of them are given below:

Couple of options to select splash screen: You can now select launch screen file(xib), with that you can also use assets catalog.

You are looking for specific size for devices you can check that in attribute inspector of assets catalog.

For the rest of the app screens optimization you just need to Auto layout.