When iOS launches your app it shows the launch screen while your app is loading to give the impression of a responsive system. Using a static launch image is now deprecated. You should use a launch screen storyboard instead.
Last updated: Aug 10, 2020
Note: If you’re minimum deployment target is iOS 14 you can drop launch storyboards and use launch screen settings.
Using a Launch Screen Storyboard
Launch images are what iOS displays whilst loading an app to give the impression of a responsive system. Creating static launch images for the growing number of screen resolutions was a non-trivial amount of work. It has been possible since Xcode 6 and iOS 8 to use a launch screen storyboard.
Xcode adds a LaunchScreen.storyboard file by default to new projects but you can add one manually to your project using the Launch Screen template (
If you’re adding the launch storyboard manually you’ll also need to add the launch screen file in the project settings for the target:
This will add the Launch screen interface file base name (UILaunchStoryboardName) key to the
Info.plist file for the target:
At this point you can layout the launch view in Interface Builder using autolayout as necessary. You can preview the storyboard in Xcode or test it in the simulator or on an actual device. Since the launch screen is only briefly displayed you may find it useful to set a breakpoint on application:didFinishLaunchingWithOptions: in the App delegate.
Launch Screen Constraints
The system loads the launch file before launching the app which creates some constraints on what it can contain:
The app is not yet loaded so the view hierarchy does not exist and the system can not call any custom view controller setup code you may have in the app (e.g. viewDidLoad)
You can only use standard UIKit classes so you can use UIView or UIViewController but not a custom subclass. If you try to set a custom class you will get an Illegal Configuration error in Xcode.
The launch file can only use basic UIKit views such as UIImageView and UILabel. You cannot use web views.
The Apple Human Interface Guidelines suggest you make the launch screen match the first screen of your app. The user should only see your launch image for a fraction of a second so you want to avoid the user seeing a flash as your main interface loads. You should also avoid text or creating any sort of splash screen.
The idea is that you don’t draw attention to the launch image. It should be quickly replaced by the actual user interface of your app.
A Quick Example
Consider this user interface for an app that uses a table view embedded in a navigation view:
The launch image for this user interface only needs to show the navigation bar and background color to give the user the appearance the app is loading. As the table view loads and populates it smoothly replaces the launch image.
My launch storyboard in this case is a plain view controller embedded in a navigation controller:
In general, the simpler you make the launch storyboard the better.