title: iOS navigationController pushViewController not working
body: <p>I have a storyboard with a <code>UINavigationController</code>. The root view controller of the navigation controllers is called rootViewController.</p>
  
  <p>I am trying to programmatically change the view controller (depending on other conditions) to another view controller called <code>loginViewController</code>.</p>
  
  <p>I am trying to do this in the <code>viewDidLoad</code> from the rootViewController like this:</p>
  
  <pre><code>- (void)viewDidLoad
  {
  
      [super viewDidLoad];
  
      loginViewController *viewController = [[loginViewController alloc] init];
  
      [self.navigationController pushViewController:viewController animated:YES];
  
  }
  </code></pre>
  
  <p>I am not getting any errors but it's not working. </p>
  
  <p>It just loads the navigation controller with the top nav back button but the rest of the screen is black. It's like it's not loading any view controller.</p>
  
  <p>I am trying to figure out what I am doing wrong.</p>
  
  <p>Any help with this would be great.</p>
  
  <p>Thanks</p>