Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute code in Launch Screen

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.

like image 956
Dmitriy Avatar asked Dec 24 '14 20:12

Dmitriy


People also ask

How do I launch storyboard in screen?

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.

How do I add launch screen to Xcode?

You should do it from within Xcode: Select "New File" In iOS UserInterface section, select LaunchScreen.

How do I add launch screen in swift UI?

In SwiftUI projects, the launch screen is not generated by default. You need to add it manually in the Info. plist file. After opening the file, you should see an entry named Launch Screen.


1 Answers

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.

like image 119
Midhun MP Avatar answered Oct 08 '22 21:10

Midhun MP