title: How to add a Navigation Controller with Interface Builder?
body: <p><strong>1. Step:</strong> Create a new UIViewController:<br>
  - Xcode -> New File... -> Cocoa Touch Class -> UIViewController<br>
  - Name: MyViewController</p>
  
  <p><strong>2. Step:</strong> Drag and drop a "Navigation Controller" (UINavigationController) from the Library to MyViewController.xib</p>
  
  <p><img src="https://i.stack.imgur.com/Wkdt4.jpg" alt="alt text"></p>
  
  <p><strong>3.Step:</strong> I'm sure, I have to do something to connect the Navigation Controller correctly, isn't it?</p>
  
  <p><strong>4.Step:</strong> Try to start the new View Controller as a modal dialog:  </p>
  
  <pre><code>MyViewController *myViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
  NSLog(@"navContr: %@", myViewController.navigationController);
  [self.navigationController presentModalViewController: myViewController animated:YES]; 
  </code></pre>
  
  <p>Result: "navContr: nil"</p>
  
  <p><strong>5.Step:</strong> You can see the new modal view (MyViewController), but there's no NavigationController and no UINavigationBar.</p>
  
  <p>Thank you very much for your help!  </p>
  
  <hr>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p><strong>6.Step:</strong> I set a new UIViewController (ViewNavi2) as "Root View Controller":<br>
  <img src="https://i.stack.imgur.com/VbcqC.png" alt="alt text"></p>
  
  <p><strong>7.Step:</strong> I define a <code>IBOutlet UINavigationController *navigationController</code> in the class MyViewController and configure the xib: Navigation Controller -> Connections -> Referencing Outlets</p>
  
  <p>But my Navigation Controller is still nil :-(</p>
  
  <pre><code>MyViewController *myViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
  NSLog(@"navContr: %@", myViewController.navigationController);
  // -&gt; "navContr: nil"
  </code></pre>