title: cannot get shouldautorotate to fire when changing orientation
body: <p>I'm developing an app with Xcode9 using Swift4 and it was originally intended for just iPads but now needs to run on phones too. I need to lock the phones to Portrait and iPads remain Portrait/Landscape.</p>
  
  <p>I've done this before using the shouldautorotate function and returning true or false depending on the device as below.</p>
  
  <pre><code>override func shouldAutorotate() -&gt; Bool {
     return false
  }
  
  override func supportedInterfaceOrientations() -&gt; UIInterfaceOrientationMask {
     return UIInterfaceOrientationMask.all
  }
  </code></pre>
  
  <p>However, when I change the orientation it does not fire. Is this another depreciated method and if so how do I restrict the orientation now?</p>