title: iOS 6 UITabBarController supported orientation with current UINavigation controller
body: <p>I have an iPhone app I am updating to iOS 6 that is having rotation issues. I have a <code>UITabBarController</code> with 16 <code>UINavigationCotrollers</code>. Most of the subviews can work in portrait or landscape but some of them are portrait only. With iOS 6 things are rotating when they shouldn't.</p>
  
  <p>I tried subclassing the tabBarController to return the <code>supportedInterfaceOrienations</code> of the current navigationController's selected viewController:</p>
  
  <pre><code>- (NSUInteger)supportedInterfaceOrientations{
  
      UINavigationController *navController = (UINavigationController *)self.selectedViewController;
      return [navController.visibleViewController supportedInterfaceOrientations];
  }
  </code></pre>
  
  <p>This got me closer. The view controller won't rotate out of position when visible, but if I am in landscape and switch tabs the new tab will be in landscape even if it isn't supported.</p>
  
  <p>Ideally the app will only be in the supported orienation of the current visible view controller. Any ideas?</p>