iOS: how to delay the launch screen?

ishahak picture ishahak · Jan 27, 2016 · Viewed 33.1k times · Source

When launch an app, the LaunchScreen.xib is removed as soon as all the assets are initialized.

I want to make the launch screen stay for at least 1 sec.

Is there a way to achieve this?

Thank you!

Answer

EmilioPelaez picture EmilioPelaez · Jan 27, 2016

You can create a view controller that uses the LaunchScreen storyboard, present it (not animated) on applicationDidFinishLaunching or applicationWillFinishLaunching, and dismiss it whenever you want.

Keep in mind this is discouraged by Apple because it gives the impression that your app takes a lot longer to launch, which is bad user experience and might cause some of your users to delete your app.