title: iOS. How to enable and disable rotation on each UIViewController?
body: <p>I have an UIViewController, I want to disable or enable rotation of the screen in different scenarios</p>
  
  <p>Example: </p>
  
  <pre><code>if flag {
     rotateDevice = false
  }
  else {
     rotateDevice = true
  }
  </code></pre>
  
  <p>How can I do that?</p>