Well, looks like all that fuss may be going away soon:
An Interface Builder-Based Launch Screen
In Xcode 6, there is another option. You can specify a storyboard whose initial view controller will then be used as the appʼs launch screen. This is how:
- Create a blank storyboard file named LaunchScreen.storyboard.
- Go to your target settings and, on the General tab, select the storyboard as your Launch Screen File. Xcode will add a corresponding UILaunchStoryboardName key to your appʼs Info.plist. When this key is present, Xcode will prioritize it over any launch images you might have set.
- Add a view controller scene to the storyboard. Add some subviews to the scene and position them with constraints. When you launch the app on a device, the OS should use the scene as the launch screen.
One Storyboard for All Screen Sizes
You can use the new adaptive UI features in Interface Builder to fit your layout to different screen sizes. If your scene requires screen-size-specific images, use asset catalogs to define different images per size class. Note that you can not only adjust constraints for different size classes, you can also remove selected views from a specific size class entirely by deselecting the Installed check box. See WWDC session 411 for details.
Also Works with NIBs
Despite the name of the UILaunchStoryboardName key, this also seems to work with NIB/XIB files containing a single view. When you open such a XIB file in Xcode, the File Inspector displays a check box named Use as Launch Screen, which is not there for storyboards…
There’s a number of partially-implemented caveats at the moment, but looks like a solid reason to get up to speed on those new adaptive UI features, because as they say…
Speaking of which, here’s a handy UICustomResolutions extension for UIWindow to help testing that!
h/t: iOS Dev Weekly!