title: Why does using setViewControllers remove everything from the UINavigationController's nav bar?
body: <p>Here's the issue. I use the following code in a <code>UINavigationController</code> to swap the <code>rootViewController</code>. I need to be able to swap the <code>rootViewController</code> between a number of different screens and allow the user to drill down from each screen (which is obviously why I need the Nav Controller):</p>
  
  <pre><code>SomeViewController *tmp = [[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:nil];
  NSArray * viewControllers = [self viewControllers];
  NSArray * newViewControllers = [NSArray arrayWithObjects:tmp, nil];
  [self setViewControllers:newViewControllers];
  </code></pre>
  
  <p>Now in reading through the class reference for the <code>UINavigationController</code> I saw that for the "viewControllers" property it says: "the root view controller is at index 0 in the array, the back view controller is at index n-2, and the top controller is at index n-1, where n is the number of items in the array."</p>
  
  <p>When I print a count of my viewControllers array there, I get 1, the current rootViewController. Should there not be something in there for the top controller (which I assume to be the nav bar)?</p>
  
  <p>As soon as I use <code>setViewControllers</code> with the new view, everything in my nav bar disappears. I'll add that I have a left and right button as well as a custom title button which are all initialized and added to the nav bar in the init method and have been working fine until they disappeared on me.</p>
  
  <p>Any help would be greatly appreciated.</p>