title: How to push viewcontroller from appdelegate in storyboard inside navigation controller
body: <p>I am using SWRevealViewController in my project, and I want to open a particular controller when the app receives a notification. I have tried so many solutions but nothing works.</p>
  
  <p>I follow this <a href="http://www.appcoda.com/ios-programming-sidebar-navigation-menu/" rel="noreferrer">http://www.appcoda.com/ios-programming-sidebar-navigation-menu/</a> by using storyboard.  My storyboard is designed as below:</p>
  
  <p><a href="https://i.stack.imgur.com/PZG6o.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PZG6o.png" alt="Storyboard"></a></p>
  
  <p>When the application receives a notification I want to load Photo view controller within its navigation controller. I tried with the following code in the AppDelegate:</p>
  
  <pre><code>UIStoryboard *st = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
      photoViewController *descController = (PhotoViewController*)[st instantiateViewControllerWithIdentifier: @"photoView"];
      UINavigationController *frontNavigationController = [[UINavigationController alloc] initWithRootViewController:descController];
      SidebarTableViewController *rearViewController = (SidebarTableViewController*)[st instantiateViewControllerWithIdentifier: @"menuController"];
  
      SWRevealViewController *mainRevealController = [[SWRevealViewController alloc]  init];
  
      mainRevealController.rearViewController = rearViewController;
      mainRevealController.frontViewController= frontNavigationController;
      self.window.rootViewController =nil;
      self.window.rootViewController = mainRevealController;
      [self.window makeKeyAndVisible];
  </code></pre>
  
  <p>This works, but creates a new Navigtion controller, and what I need is to use the one already defined in the storyboard, since it has specific properties.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>