I'm developing an iOS app using Swift and my app should be in portrait mode. I have one on view to capture images. I want to display that view only in landscape mode. This app is for iOS 7 or above.
In the project "General" Device Orientation is set as "Portrait"
In the storyboard Simulated Metrics section the orientation is set as "Landscape"
Above image shows the UIViewController settings in the storyboard and following code is in the UIViewConroller.
override func shouldAutorotate() -> Bool {
return false
}
override func supportedInterfaceOrientations() -> Int
{
return Int(UIInterfaceOrientationMask.LandscapeRight.rawValue)
}
This doesn't give the expected output.
I'm new to iOS development I have no idea how to achieve this.
Any ideas please.