In order to get iPad Pro to use full resolution at launch, we have to use a Launch Screen File.
I've never used a Launch Screen XIB/Storyboard before, because my app is backwards compatible to iOS 7. Normally I use a LaunchImage asset catalog to define a specific static image for each device dimension and launch orientation.
Now I'm trying to define a Launch Screen File that acts like a LaunchImage asset catalog, but I'm struggling to do it. In particular:
1) I don't see a good way to select a different UIImage depending on the exact size of the device, e.g. show one image to iPhone 4S users and another image to iPhone 5 users.
2) I don't see a way to select a different UIImage for iPad Portrait and iPad Landscape views. Size classes seem to think that both iPad Portrait and iPad Landscape are "Regular" width and "Regular" height, so any UIImage that would show up on iPad Portrait will also show up in iPad Landscape.
Splash Screen is the very first screen the user sees when they open up an app on a mobile device. It's the very first chance of creating a positive impact on the users. It appears while the app is loading when the user has just opened up the app. Many times the Splash screen is called a launch screen.
The LaunchScreen. storyboard is an interface builder storyboard file that uses auto-layout and some basic constraints on the controls to adjust the display for all the supported devices. Perform this task in the copy of the DeploymentKitApp in Xcode on your computer.
In iOS, iPadOS, and tvOS, the system displays a launch screen the moment your app or game starts and quickly replaces it with your first screen, giving people the impression that your experience is fast and responsive.
The colour scheme is taken straight from their logo and app icon, which effectively promotes their brand as you open the app. The light text on a dark but distinctive coloured background with a gradient stands out and draws the app user’s eyes towards the logo. Soompi: Soompi’s app launch screen is effective for a few reasons.
People appreciate a streamlined launch experience so they can start using your app or game immediately. Provide a launch screen if the platform requires it.
Soompi: Soompi’s app launch screen is effective for a few reasons. Firstly, the logo is clear and stands out against the dark background. The background is fun and animated, containing illustrations and text relating to the app contents (it’s a news app focused on the K-Pop industry).
The system loads the launch file before launching the app which creates some constraints on what it can contain (some of which may force you back to static image files):
1.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)
2.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.
3.The launch file can only use basic UIKit views such as UIImageView and UILabel. You cannot use a UIWebView.
4.If you are using a storyboard you can specify multiple view controllers but there are again some limitations. For example you can embed view controllers in a navigation or tab bar controller but more complex container classes such as UISplitViewController do not work (at least not yet).
5.Localizing the launch file does not currently seem to have any effect. The base localization is always used so you will probably want to avoid text on the launch screen.
6.You cannot specify different launch files for iPad and iPhone. This may be a problem if you have significantly different interfaces for those devices as there is only so much you can do with auto layout and size classes.
Note that if you are deploying to iOS 7 you will still need to include the static launch image files. You can include both a launch image file and static launch images. Devices such as the iPhone 6 running iOS 8 will use the launch image file whilst iOS 7 devices will fallback to the launch images.
First create all your images. Then, open up your asset catalog and right click -> App Icons & Launch Images -> New iOS Launch Image. This will create an file to drag all your files into. Do that. Name the asset "Launch."
Create a new launch screen storyboard with command-n. Choose iOS -> User Interface -> Launch Screen. Call the file "Launch Screen."
In your Launch Screen storyboard, select the view controller's view
[.
Optional... if you want it to look nice in your storyboard, select the view and do option-cmd-= to update the frame of the UIImageView.
Go to your info.plist, and type the name of your storyboard ("Launch Screen") for the key "Launch screen interface file base name"
Clean and run.
Hope that helps and that I didn't forget anything!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With