title: Force landscape mode in one ViewController using Swift
body: <p>I am trying to force only one view in my application on landscape mode,
  I am calling:</p>
  <pre><code>override func shouldAutorotate() -&gt; Bool {
      print(&quot;shouldAutorotate&quot;)
      return false
  }
  
  override func supportedInterfaceOrientations() -&gt; Int {
      print(&quot;supportedInterfaceOrientations&quot;)
      return Int(UIInterfaceOrientationMask.LandscapeLeft.rawValue)
  }
  
  override func preferredInterfaceOrientationForPresentation() -&gt; UIInterfaceOrientation {
      return UIInterfaceOrientation.LandscapeLeft
  }
  </code></pre>
  <p>The view is launched in the <em>portrait</em> mode, and keep rotating when I change the device orientation. The <code>shouldAutorotate()</code> method is never called.</p>
  <p>Any help would be appreciated.</p>