swiftxcodestoryboardlaunch-screen

Launch Screen after programmatically coding app


I've been programmatically coding an app and I suddenly decided to do some work on the Launch Screen, I haven't touched it since I created the project file and I've tried adding a UILabel text as well as UIImageView (both respectively with constraints), however I can't seem to get the LaunchScreen to show on simulator my device.

Does anyone have any experience working with launch screens on a non-storyboard project? Any tips to offer on how to get it to work?

My launch screen has all the appropriate boxes ticked, such as Use as Launch Screen and Is Initial Controller


Solution

  • Maybe your expectations are wrong. A launch screen is not a splash screen; it's just to give the user some sense that something is happening in the heart-stopping moment after tapping an icon in the springboard before the app is actually up and running. It will show very briefly and should be more or less identical to the initial interface of the app (usually minus a lot of detail). You might have to turn on Slow Animations to see the launch screen at all; if your app does very little during launch (which is good) you might barely see the launch screen briefly even then!

    In this example the launch screen is red and even with Slow Animations it has faded to the white of the real app long before the app fills the screen:

    enter image description here