How to support various iphone screen sizes as of 2014?

后端 未结 5 1872
星月不相逢
星月不相逢 2020-12-19 08:36

I\'m almost done building my first iPhone app and am trying to add a background image, and am finding it a little confusing, because nowadays there\'s like 3 or 4 different

5条回答
  •  失恋的感觉
    2020-12-19 08:59

    You will need three versions of the background image(1x,2x,3x).A good practice to have images of the correct size is to make an image of a size that is 3 times the size of your view and then make the 2x and 1x versions by scaling down.

    Apple has come up with a new concept called 'Size Classes' to support the different device sizes.To use size classes you will need the latest version of Xcode(Xcode 6). In the interface builder you can set different set of constraints for different size classes. This way it becomes easier to support all screen sizes. To know more about Size classes watch the WWDC 2014 video "Building Adaptive Apps with UIKit".

提交回复
热议问题