title: How do we dictate app orientation in iOS 8?
body: <p>In iOS 7 we said:</p>
  
  <pre><code>// ViewController1:
  
  -(NSUInteger)supportedInterfaceOrientations {
      return UIInterfaceOrientationMaskLandscape;
  }
  
  -(BOOL)shouldAutorotate {
      return YES;
  }
  
  // ViewController2, presented by modal segue from button in ViewController1
  
  -(NSUInteger)supportedInterfaceOrientations {
      return UIInterfaceOrientationMaskPortrait;
  }
  
  -(BOOL)shouldAutorotate {
      return YES;
  }
  </code></pre>
  
  <p>The result was that the app appeared in landscape in view controller 1 and in portrait in view controller 2.</p>
  
  <p>That code works fine in iOS 7, including the iOS 7 simulators in Xcode 6. But it no longer works in iOS 8. There are two problems:</p>
  
  <ul>
  <li><p>View Controller 1's view is appearing in landscape, but the simulator is not automatically rotating (might just be a simulator bug) and (this is the really important part) the view is not automatically being resized, so it is too narrow for the screen (there's a big black area to its right).</p></li>
  <li><p>View Controller 2's view is appearing in the same orientation as View Controller 1's view (landscape, not portrait).</p></li>
  </ul>
  
  <p>So view controller views are not automatically resizing to fill the screen, and the presented view controller's supported orientations are not being honored.</p>
  
  <p>So how are we supposed to do this now? Does it have to do with trait collections? With preferred content size? With setting the status bar orientation manually?</p>