title: iOS application tried to push a nil view controller on target <UINavigationController:
body: <p>XMPP
  Using to tableview i am trying to go to next view controller with particular username. so for that i have implemented UItablevie's <code>didselectrowatIndexpath</code> correctly. but when i click on username it will gives error like this.</p>
  
  <blockquote>
    <p>application tried to push a nil view controller on target.</p>
    
    <p>"&lt;"UINavigationController: 0x7fe831dac0d0>.
    2015-06-04 14:22:51.063 </p>
  </blockquote>
  
  <p>I have declared storyboard in appdelegate.m like this.</p>
  
  <pre><code> - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
        ChatViewController *ChatViewController1 = [[ChatViewController alloc]init];
  self.storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  
  
  return YES;
  }
  </code></pre>
  
  <p>and here is my tableview's Delegate method.</p>
  
  <pre><code> - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
   {
  [self.tblvwbuddy deselectRowAtIndexPath:indexPath animated:YES];
  XMPPUserCoreDataStorageObject *user = nil;
  user = [[self fetchedResultsController] objectAtIndexPath:indexPath];
  
  ChathistryViewController *chathistory1 = [[ChathistryViewController alloc] init]; // or initWith...
  chathistory1 = [appdelegate.storyboard instantiateViewControllerWithIdentifier:@"ChathistryViewController"];//My next view controller's name
       chathistory1.chatUserObject = user;
  
        chathistory1.hidesBottomBarWhenPushed = YES;
  
  chathistory1.self.tabBarController.navigationItem.title = user.displayName;
  
  [self.tabBarController.navigationController pushViewController:chathistory1 animated:YES];
  
  }
  </code></pre>
  
  <p>What i am missing in this ? or where i am wrong?</p>