title: Show a login screen before a Tab Bar Controller
body: <p>I'm doing an Twitter app, and on the AppDelegate <code>-didFinishLaunchingWithOptions</code> I'm using next code for loading the login view if NSUserDefaults on that object are empty:</p>
  
  <p>NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];</p>
  
  <pre><code>NSString *test = [prefs objectForKey:@"username"];
  if (test == @"(null)" || test == nil) {
      LoginScreenViewController *login = [[LoginScreenViewController alloc] initWithNibName:@"LoginScreenViewController" bundle:nil];
      [self.window addSubview:login.view];
      [self.window makeKeyAndVisible];
  
  } else {
      [self.window addSubview:tabBarController.view];
      [self.window makeKeyAndVisible];
  }
  </code></pre>
  
  <p>And I'm able to load the login view, but then how would I dismiss it? The login screen has to show up before the tabBarController is loaded, so when the Login controller is done, the tab bar controller gets started as if it wouldn't have any other view before. Thanks in advance!</p>