title: Handling autorotation for one view controller in iOS7
body: <p>I've read many answers on SO but I can't seem to get autorotation working on iOS7.</p>
  
  <p>I only need one view controller to rotate, so I don't want to set rotation settings in my Info.plist.</p>
  
  <p>As I understand Apple's documentation, a single view controller can override global rotations settings (from Info.plist) by simply overriding two methods. Info.plist is set to only allow Portrait, and my view controller implements the following methods:</p>
  
  <pre><code>- (NSUInteger)supportedInterfaceOrientations
  {
      NSLog(@"%s", __PRETTY_FUNCTION__);
      return UIInterfaceOrientationMaskAllButUpsideDown;
  }
  
  - (BOOL)shouldAutorotate
  {
      NSLog(@"%s", __PRETTY_FUNCTION__);
      return true;
  }
  </code></pre>
  
  <p>I'm seeing those NSLog statements upon rotation but nothing rotates.</p>
  
  <p>If I do configure Info.plist with the proper rotation settings, my view will rotate, but not if I try and rely on my view controller.</p>
  
  <p>Not sure if it matters, but the view I'm trying to rotate is from a .xib using auto layout.</p>
  
  <p>Also, my ViewController is being presented modally and is contained in a navigation controller. I've tried just presenting the view controller by itself and that doesn't work. I've also tried <a href="https://stackoverflow.com/questions/15004271/prevent-autorotate-for-one-view-controller#answer-15004471">adding a category to UINavigationController</a> to get it's autorotation directions from it's topViewController.</p>