0

Now, I have seen other questions about this same topic, however I need a little more clarification.

I have my storyboard set up with a UINavigationController as my initial view controller. My first displayed view I call HomeViewController. On the first app launch I would like to start with the TutorialViewController but then be able to have the user dismissViewController and see the home view. My initial reaction is to test a boolean set in user defaults from the viewDidLoad or viewDidAppear in the HomeViewController and then call a modal segue to the TutorialViewController,

if let myObject : AnyObject = def.objectForKey("noob"){
}else{
    let tutView : TutViewController = self.storyboard.instantiateViewControllerWithIdentifier("MyViewController");
    [self.view.window.rootViewController presentViewController:viewController animated:YES completion:nil];
    self.performSegueWithIdentifier("jumpTut", sender: self);
}

however this looks weird as you see the home viewController for a split second and then get jerked over to the TutorialViewController. I also get warnings like:

Warning: Attempt to present <MemoryLane.TutViewController: 0x17d746b0> on <UINavigationController: 0x17d73480> whose view is not in the window hierarchy!

Any ideas on how I should set all this up?

Community
  • 1
  • 1
Chase Roberts
  • 9,082
  • 13
  • 73
  • 131

0 Answers0