title: ios: Accessing a navigation controller from app delegate
body: <p>I have an app that receives push notifications. In didReceiveRemoteNotifications, I would like to make the app show a particular view controller in the app's navigation controller (which happens to be the root view controller). What is the best way to make this happen? Can I get a reference to the navigation controller in the app delegate? </p>
  
  <p><strong>EDIT:</strong> Here is the code I'm trying to use right now. It appears to use the correct navigation controller, but it doesn't display the view controller at all, just a blank screen:</p>
  
  <pre><code>        UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
          EventDetailViewController *destCon = [storyboard instantiateViewControllerWithIdentifier:@"EventDetailViewController"];
          destCon.event=notifyEvent;
          UINavigationController *navController =(UINavigationController *) self.window.rootViewController;
          [navController pushViewController:destCon animated:YES];
  </code></pre>
  
  <p>Here is what I'm seeing:</p>
  
  <p><img src="https://i.stack.imgur.com/HvJp5.png" alt="enter image description here"></p>