Heky
Heky

Reputation: 115

iOS Launch Screen for app with different themes?

I would like to create a launch screen(s) for my app which gives user an option to choose a theme (black or white).

What is the best approach to create a launch screen when I don't know what theme will be used at start-up?

Any advice will be highly appreciated.

Thanks!

Upvotes: 4

Views: 2086

Answers (2)

iOS.Lover
iOS.Lover

Reputation: 6051

You can not program LaunchScreen.storyboard the alternative way is create a ThemeViewController for example and setup your app's appearance there,then check if user selected a theme skip that view controller to your app main view controller.You can detect if user select a theme using NSUserdefualts.

My suggestion is create a default theme for your app then if users would like to change it they will go to Settings and change the theme.

Upvotes: 2

Juri Noga
Juri Noga

Reputation: 4391

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 and so - can't customize LaunchScreen.xib.

Upvotes: 0

Related Questions