title: Swift UIInterfaceOrientation for Multiple views
body: <p>I have a navigation controller with multiple views. Most of the views are in portrait, and thus i lock it into portrait view by placing the following code in the Navigation View Controller</p>
  
  <pre><code>override func shouldAutorotate() -&gt; Bool {
      return false
  }
  
  override func supportedInterfaceOrientations() -&gt; Int {
      return UIInterfaceOrientation.Portrait.toRaw()
  }
  </code></pre>
  
  <p>This works just fine, and locks all my views in portrait orientation. However, This is 1 view that needs to only be in Landscape. If I use the code above, it locks my Landscape View, into portrait mode, and thus cutting off most of the view.</p>
  
  <p>Can anybody help me out with what to use in the Landscape view controller to lock this particular View in landscape only.</p>
  
  <p>I was using this, but it doesn't work.</p>
  
  <pre><code>override func supportedInterfaceOrientations() -&gt; Int {
      return Int(UIInterfaceOrientationMask.Landscape.toRaw())
  }
  
  override func shouldAutorotate() -&gt; Bool{
      // This method is the same for all the three custom ViewController
      return true
  }
  </code></pre>