title: UIViewController -viewDidLoad not being called
body: <p>Being new to Cocoa, I'm having a few issues with <code>Interface Builder</code>, <code>UIViewController</code> and friends.</p>
  
  <p>I have a <code>UIViewController</code> subclass with a <code>UIView</code> defined in a xib, and with the controller's view outlet connected to the view. The xib's "file's owner" is set as <em>myViewcontroller</em> subclass.</p>
  
  <p>In this one instance, the following code to load the controller/view (from the main view controller) doesn't work as expected:</p>
  
  <pre><code>if ( self.myViewController == nil )
  {
      self.myViewController = [[MyViewController alloc]
          initWithNibName:@"MyViewController" bundle:nil];
  }
  
  [self.navigationController 
      pushViewController:self.myViewController animated:YES];
  </code></pre>
  
  <p>In MyViewController's methods, I have placed breakpoints and log messages to see what is going on:</p>
  
  <pre><code>-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
  
      if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
          NSLog(@"initWithNibName\n");
      }
  
      return self;
  }
  
  -(void)viewDidLoad {
  
      [super viewDidLoad];
      NSLog(@"viewDidLoad\n");
  }
  </code></pre>
  
  <p><strong>Expected result</strong></p>
  
  <p>Both <code>-initWithNibName</code> and <code>-viewDidLoad</code> methods are called, and myViewController's view is displayed.</p>
  
  <p><strong>Observed result</strong></p>
  
  <p>Only <code>-initWithNibName</code> is called, the view is not displayed.</p>
  
  <p>Have I missed something? Can anyone recommend anything to check? (Particularly in the wondrously opaque Interface Builder tool).</p>