0

I've implemented a storyboard based splash screen that mimics the default state of my app. Problem is, when the user first launches the app, I take them through a registration flow that looks vastly different than the normal user experience. So the splash screen looks SUPER awkward.

In my case, I have two view controllers on this storyboard file: one with my app logo centered vertically and horizontally (which I want to use for first time launch) and one with a navigation bar, tab bar, and white space in between (which I want to use once registration is complete).

I've noticed a lot of apps have a different splash screen for first time launch and "normal" launch, but I can't figure out how to configure my app to do this.

I'm using LaunchScreen.storyboard, which is set in Info.plist as "Launch screen interface base file name". I'm targeting iOS 8 and above, so I don't use splash images.

Help!

0xMatthewGroves
  • 3,181
  • 3
  • 26
  • 43

1 Answers1

0

Refer this. The idea for you is to use a NSUserDefault boolean (say false) to check if the app is launched for the first time and then you can run a different splash controller. Remember to set that boolean to true to not show that different splash controller.

Community
  • 1
  • 1
Nicholas Ng
  • 1,428
  • 18
  • 23
  • I saw this answer. I follow this technique to keep track of a first time launch boolean in defaults. However, before ANY application code is executed (including didFinishLaunchingWithOptions per the example you linked), the launch screen fires. So I have no way to "tell" the app programmatically which view controller I want to display. And, if I remove the launch screen Info.plist entry completely, I get a black screen. – 0xMatthewGroves Jun 24 '15 at 03:29
  • @FrostRocket how about you add another view to your LaunchScreen.storyboard, add a controller to you LaunchScreen and work on the logic there to show a switch between the 2 launch views? – Nicholas Ng Jun 24 '15 at 03:40