I locked the app orientation to portrait from the general app setting like this

but still
You can override your view controller property shouldAutorotate
override var shouldAutorotate: Bool {
return false
}
If your view controller is embedded in a Navigation controller you can create a custom Navigation controller:
class PortraitNavigationController: UINavigationController {
override var shouldAutorotate: Bool {
return false
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}