title: Make a UiViewController stay in portrait mode iOS6 VS iOS5
body: <p>I'm building an app for iOS5 and iOS6. I have this UIViewController inside a UINavigationController and I want it to stay in portrait mode. </p>
  
  <p>The code works for iOS5, but not in iOS6.</p>
  
  <pre><code>// iOS5 rotation
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      if (interfaceOrientation == UIInterfaceOrientationPortrait)
          return YES;
      else
          return NO;
  }
  
  // iOS6 rotation
  - (BOOL)shouldAutorotate
  {
  
      return YES;
  
  
  }
  - (NSUInteger)supportedInterfaceOrientations
  {
      return UIInterfaceOrientationMaskPortrait;
  
  }
  </code></pre>
  
  <p>What's the problem here??? On SO I've found lot's of similar questions, but generally the answers are not working for me.</p>
  
  <p><strong>EDIT:</strong>
  Maybe I was not precise, but I need a SINGLE view controller (the homepage of my app) to stay in portrait mode <strong>and not all the app</strong>.</p>