Search code examples
iosobjective-cios5

changing the initial viewcontroller in a storyboard


I'm trying to find out if its possible to change the initial storyboards viewcontroller by code.

For example:

App launches --> Viewcontroller A loads --> user makes some interactions --> code get executed --> Viewcontroller B loads

Next time the app launches --> Viewcontroller B loads

Is this possible?


Solution

  • You need to save some indicator that says you want to go to B on launch and, if that's true go to the "code get executed --> Viewcontroller B loads" section.