I'm trying to prevent rotation on one UIViewController
and I can't achieve that.
I'm doing something like this:
open override var shouldAutorotate: Bool {
get {
return false
}
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
get {
return .portrait
}
}
And the UIViewControler
stills rotating. The UIViewController is inside a UINavigationController opened modally.
I have looked a lot of questions from here and none answers works for me.
In Swift 2 I used to override shouldAutorotate
but in Swift 3 that function doesn't exist anymore.
How can I do that in Swift 3 what I used to do in Swift 2?
supportedInterfaceOrientations
look like? – matt