In my app I have multiple views, some views need to support both portrait and landscape, while other views need to support portrait only. Thus, in the project summary, I ha
Firstly in order to make your app work in only mode you should be returning UIInterfaceOrientationMaskLandscape
. In case you want to keep only portrait mode, you are doing things correctly.
Just add the UISupportedInterfaceOrientations
key in the Info.plist and assign the interface orientation values your app intends to keep.
Also, you should be returning false from shouldAutoRotate
in case you want to avoid auto rotation totally. But I would suggest you to return true from here and specify the correct orientations in supportedInterfaceOrientations
method.