A Quick ExampleĬonsider this user interface for an app that uses a table view embedded in a navigation view: It should be quickly replaced by the actual user interface of your app. The idea is that you don’t draw attention to the launch image. You should also avoid text or creating any sort of splash screen. 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. The Apple Human Interface Guidelines suggest you make the launch screen match the first screen of your app. The launch file can only use basic UIKit views such as UIImageView and UILabel. If you try to set a custom class you will get an Illegal Configuration error in Xcode. You can only use standard UIKit classes so you can use UIView or UIViewController but not a custom subclass. 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. The system loads the launch file before launching the app which creates some constraints on what it can contain: Since the launch screen is only briefly displayed you may find it useful to set a breakpoint on application:didFinishLaunchingWithOptions: in the App delegate. You can preview the storyboard in Xcode or test it in the simulator or on an actual device. This will add the Launch screen interface file base name (UILaunchStoryboardName) key to the ist file for the target:Īt this point you can layout the launch view in Interface Builder using autolayout as necessary. ![]() 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: ![]() 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 ( File > New > File): It has been possible since Xcode 6 and iOS 8 to use a launch screen storyboard. Creating static launch images for the growing number of screen resolutions was a non-trivial amount of work. Launch images are what iOS displays whilst loading an app to give the impression of a responsive system. Note: If you’re minimum deployment target is iOS 14 you can drop launch storyboards and use launch screen settings. You should use a launch screen storyboard instead. Using a static launch image is now deprecated. When iOS launches your app it shows the launch screen while your app is loading to give the impression of a responsive system.
0 Comments
Leave a Reply. |