I am using Xcode7 and Swift with Storyboards. When I open the LaunchScreen.storyboard, and I try to set a Custom Class on it, Xcode complains that one cannot have a custom class on a LaunchScreen storyboard. So my question is, is there any way to programmatically code the LaunchScreen as I would like to avoid having to drag and drop elements on it using IB.
storyboard to configure your launch screen. If your project doesn't contain a default launch screen file, add a launch screen file and set the launch screen file for the target in the project editor. Choose File > New > File. Under User Interface, select Launch Screen, and click Next.
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.
No, The launch screen is shown before your app starts executing in order to provide a transition from the Springboard to your app while it is loading.
You can either use a fixed image or you can use a simple storyboard scene using only standard, static UI elements - labels & images.
This storyboard scene is actually loaded and displayed by the OS, so it would be a security risk to allow your code to execute in that context.
This doesn't really count as programmatically since it's just editing the info.plist file but, based on my research I found that there is a new way being introduced especially now with SwiftUI and how it will be replacing StoryBoards that I found here
Thought I share it here for people searching this topic and come across this post for the first time and who just want a different way than using StoryBoards to create their Launch Screens (like me).
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