Since my app got support for all orientation. I would like to lock only portrait mode to specific UIViewController.
e.g. assume it was Tabbed Application and when Si
For a new version of Swift try this
override var shouldAutorotate: Bool {
return false
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.portrait
}
override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
return UIInterfaceOrientation.portrait
}