I\'m creating a Universal application using Swift. I have used Storyboard and Auto-Layouts. Requirement is of creating a universal application which will support Portrait orient
If you want to set this for a specific ViewController (allow all on iPad but only portrait on iPhone) put this into your ViewController-class (Swift 4):
override var supportedInterfaceOrientations:UIInterfaceOrientationMask {
return UIDevice.current.userInterfaceIdiom == .pad ? UIInterfaceOrientationMask.all : UIInterfaceOrientationMask.portrait
}