Using Xcode 6, I am building an iOS app that targets iOS8.
I'm working on a
File > New > File > iOS - User Interface - Launch Screen
Xcode 7+ defaults to a Storyboard file for the Launch Screen.
As explained below, unlike XIBs, Storyboard files allow you to set width and height constraints to the root
I haven't been able to find an official explanation as to why XIBs behave like that, when they have a
UIView at the root.
What looks weird to me is that what we are provided with as a default (
LaunchScreen.xib) isn't set up to behave exactly like the Storyboards we've got used to.
The first solution I opted for was using a Storyboard to draw the Launch Screen, instead of a XIB:
File > New > File > iOS - User Interface - Storyboard)
LaunchScreen.storyboardin the "Launch Screen File" combo box
LaunchScreen.storyboard, add a View Controller, and make sure to tick the "Is Initial View Controller Box"
An alternative solution is removing the default
LaunchScreen.xib and replacing it with a View Controller.
Just like in the previous case, if you do so, you can work on the View Controller's View, and you'll get the usual constraint menu.