I have an app where some of the screens should be in portrait mode and some of them in landscape. For example, main menu is portrait and there is a camera button. The camera should be available only in landscape. I am using Storyboard and NavigationController. Where and what should I do to achieve this?
I already tried to include
shouldAutorotate() -> Bool {return false or return true}
neither worked. I have set the
supportedInterfaceOrientation
for every viewcontroller I have. Nothing helped. I need a function what I can call to force the screen into landscape/portrait mode.