Search code examples
iosxcodeautolayoutxibiphone-6

Optimize Interface Builder update for iPhone 6/6+ screens


I have an old project with NO storyboard. Luckily, i've got XIB files for each view controller and some custom content ( table view cells, some views etc ). So, obviously, now the project isn't optimized for 6/6+ screens. How to turn on 6/6+ screen support, add autolayout ( this project doesn't use autolayout either )?


Solution

  • Check Use Autolayout in the Document inspector in the XIB file. (Most articles that explain autolayout also start out by showing the check box. Going into autolayout without reading up on it will be an uphill battle. Try watching some WWDC sessions on it, like Taking Control of Auto Layout.)

    To turn on 6/6+ screen support, you must provide launch images for their native resolutions. If you can, use asset catalogs to make this easier, otherwise consult the documentation for the resolution of these launch images.