Execute code in Launch Screen

Dmitriy picture Dmitriy · Dec 24, 2014 · Viewed 18.1k times · Source

Xcode allows to create launch screen in .xib files via Interface Builder. Is it possible to execute some code with the xib, just like in usual view controllers? It would be great if we can set different text/images/etc while app launching.

Answer

Midhun MP picture Midhun MP · Dec 24, 2014

No, it's not possible.

When launch screen is being displayed your app will be in loading state.

Even the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions will not be completely executed while the launch screen is displayed.

So it's clear that, you don't have any access to your app and so at this point you can't execute any code.