title: Adding a UINavigationController as a subview of UIView
body: <p>I'm trying to display a UILabel on top of a UINavigationController. The problem is that when I add the UILabel as a subview of UIWindow it will not automatically rotate since it is not a subview of UIViewController (UIViewController automatically handles updating subviews during rotations).</p>
  
  <p>This is the hierarchy I was using:</p>
  
  <ul>
  <li>UIWindow
  
  <ul>
  <li>UILabel</li>
  <li>UINavigationController</li>
  </ul></li>
  </ul>
  
  <p>So I was thinking I could use the following hierarchy:</p>
  
  <ul>
  <li>UIWindow
  
  <ul>
  <li>UIViewController
  
  <ul>
  <li>UIView
  
  <ul>
  <li>UILabel</li>
  <li>UINavigationController</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>This way the label could be displayed on top of the UINavigationController's bar while also automatically being rotated since it is a subview of UIViewController.</p>
  
  <p>The problem is that when I try adding a UINavigationController as a subview of a view:</p>
  
  <pre><code>[myViewController.view addSubview:myNavigationController.view];
  </code></pre>
  
  <p>it will appear 20 pixels downwards. Which I'm guessing is because it thinks it needs to make room for the status bar. But, since the UINavigationController is being placed inside a UIView which does not overlay on top of the status bar, it is incorrectly adding an additional 20 pixels. In other words, the top of the UINavigationBar is at the screen's 40 pixel mark instead of at 20 pixels.</p>
  
  <p>Is there any easy way to just shift the UINavigationController and all of its elements (e.g. navigation bar, tool bar, root view controller) up 20 pixels? Or to let it know that it shouldn't compensate for a status bar?</p>
  
  <p>If not, I guess I would need to use my first hierarchy mentioned above and figure out how to rotate the label so it is consistent with the navigation bar's rotation. Where can I find more information on how to do this?</p>
  
  <p>Note: by "displaying a label on top of the navigation bar", I mean it should overlay on top of the navigation bar... it can't simply be wrapped in a bar button item and placed as one of the items of the navigation bar.</p>