title: Interplay between UINavigationController’s addChildViewController and topViewController
body: <p>I have something like a modal view controller that I need to display above my other view controllers. I’m not using the regular modal controller feature (<code>presentViewController:</code> and friends), since I need better control over the process. Instead I am using the view controller containment feature (the <code>addChildViewController:</code> method group).</p>
  
  <p>The containment feature makes the code fairly straightforward. When I need to present the “modal” view controller, I add it as a child to the view controller hierarchy and everything works as expected. One small catch is that the regular view controllers are wrapped in a navigation controller. Therefore I have to add the modal controller as a child of the navigation controller, otherwise it would be covered by the navigation bar and toolbar.</p>
  
  <p>Now the problem is that calling <code>addChildViewController:</code> on a navigation controller also sets the new controller as the <code>topViewController</code>, as if the controller was pushed using the regular <code>pushViewController:</code> method. This means that while the modal controller is displayed, the regular controller underneath it does not receive the appearance and rotation callbacks.</p>
  
  <p>This feels like a bug, or am I missing something?</p>