title: iOS: How to get pointer to navigation controller
body: <p>I'm obviously missing something...</p>
  
  <p>In my iOS app, I push a UIViewController onto a navigation controller:</p>
  
  <pre><code>MyViewController *mvc = [[MyViewController alloc] initWithNibName:@"MyViewController"];
  [self.navigationController mvc animated:YES];
  </code></pre>
  
  <p>MyViewController displays fine, and I can see and use the navigationBar, but when I try to get a pointer back to the navigation controller from within my view controller, I get a nil result.</p>
  
  <pre><code>UINavigationController *nav = [self navigationController];
  if (!nav) {
      NSLog(@"no nav");
  }
  </code></pre>
  
  <p>I've been beating my head against this all day, but can't see that I'm doing anything wrong. I get no warnings or errors in Xcode. Am I completely missing something?</p>
  
  <p>TIA: john</p>