The goal:
When my app starts up - I need it to display a view before it gets to the \"Home\" screen. Its a tab bar application and this view is not
Change the rootviewcontroller of window programaticaly
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIStoryboard *aStoryBoard=[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
UITabBarController *aTabCtrl=[aStoryBoard instantiateViewControllerWithIdentifier:@"Tab"];
FirstVC *aFirstCtrl=[aStoryBoard instantiateViewControllerWithIdentifier:@"First"];
if(self.termsHaveBeenAccepted)
self.window.rootViewController=aFirstCtrl;
else
self.window.rootViewController=aTabCtrl;
return YES;
}
This will definitely work I have tested.