title: iOS6 Orientation
body: <p>I have a question about iOS 6 Orientation.Here is my file
  <a href="https://www.dropbox.com/s/f8q9tghdutge2nu/Orientations_iOS6.zip" rel="nofollow">https://www.dropbox.com/s/f8q9tghdutge2nu/Orientations_iOS6.zip</a></p>
  
  <p>In this sample code,I want to make the <code>MasterViewController</code> only has a Portrait Orientation and the <code>DetailViewController</code> has a Portrait Orientation,Landscape Orientation.</p>
  
  <p>I know iOS 6 Orientation is controlled by top-most controller.</p>
  
  <p>So I custom a <code>UINavigationController(CustomNavigationController)</code>, set supportedInterfaceOrientations and shouldAutorotate in that class.</p>
  
  <pre><code>-(NSUInteger)supportedInterfaceOrientations{
      if([[self topViewController] isKindOfClass:[DetailViewController class]]){
          return UIInterfaceOrientationMaskAllButUpsideDown;
      }else{
          return UIInterfaceOrientationMaskPortrait;
      }
  }
  
  -(BOOL)shouldAutorotate
  {
      return YES;
  }
  </code></pre>
  
  <p>Everything is fine except when <code>DetailViewController</code> at Landscape Orientation press back button,<code>MasterViewController</code> will show the Landscape Orientation.</p>
  
  <p>Can I let <code>MasterViewController</code> always show Portrait Orientation and <code>DetailViewController</code> can has many orientation?</p>
  
  <p>thanks!</p>