title: check for user logged in before going to scene in storyboards
body: <p>First, I am using storyboards for my navigation. I have come to a point where I am at a menu screen that goes off to 4 different views (just with a navigation controller) for 2 of those views I want it to check if the user has logged in and if not I want the LoginViewController/View brought up. I am very new to objective c/xcode and after searching for a solution this is what i have come up with. I do not know how to tie this in to my program. Does this just need to be linked to my button or am i completely off with what i am doing now?</p>
  
  <pre><code>if (self.appDelegate.userHasActiveLogin) {
      UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
      UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"ViewController2"];
      [vc setModalPresentationStyle:UIModalPresentationFullScreen];
  
      [self presentModalViewController:vc animated:YES];}
  else {
      UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
      UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"LoginController"];
      [vc setModalPresentationStyle:UIModalPresentationFullScreen];
  
      [self presentModalViewController:vc animated:YES];
  }
  </code></pre>