title: - viewDidLoad infinite loop issue...(iOS)
body: <p>I'm attempting to write a multiview app in iOS and really having a bit of a tough time... I've setup a new project and I've got a rootViewController being launched by the appDelegate. In turn, the rootViewController attempts to load and display my first content view, although I seem to have fallen into some kind of infinite loop, I'm hoping someone here may have a hunch as to why...</p>
  
  <pre><code>    -(void)viewDidLoad
  {   
      // Load up new instance of view
      TopLevelViewController *topLevelController = 
      [[TopLevelViewController alloc] initWithNibName:@"TopLevelView" bundle:nil];
  
      // Hand off viewController reference to root controller
      self.topLevelViewController = topLevelController;
  
      // Display the view
      [self.view insertSubview:topLevelController.view atIndex:0];
  
      // Release viewController
      [topLevelController release];
  
  
      [super viewDidLoad];
  }
  </code></pre>
  
  <p>Above is my rootViewController viewDidLoad: method, although every time it executes insertSubview, it seems to return to the top and perform the whole thing again. I'm a bit confused as I've based this code almost identically on a tutorial I followed and it ran beautifully...which leads me to think the problem must be elsewhere, although I couldn't possibly think where. </p>
  
  <p>Appreciate any insight!</p>