overriding shouldAutorotate not working in Swift 3
<p>I'm trying to prevent rotation on one <code>UIViewController</code> and I can't achieve that.</p>

<p>I'm doing something like this:</p>

<pre><code>open override var shouldAutorotate: Bool {
    get {
        return false
    }
}

override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
    get {
        return .portrait
    }
}
</code></pre>

<p>And the <code>UIViewControler</code> stills rotating. The UIViewController is inside a UINavigationController opened modally.</p>

<p>I have looked a lot of questions from here and none answers works for me.</p>

<p>In Swift 2 I used to override <code>shouldAutorotate</code> but in Swift 3 that function doesn't exist anymore.</p>

<p>How can I do that in Swift 3 what I used to do in Swift 2?</p>