how do I make sure that UIInterfaceOrientationPortraitRight and UIInterfaceOrientationPortraitLeft are not supported.
Basically I want my 开发者_Python百科application to be used ONLY in UIInterfaceOrientationLandscapeRight and UIInterfaceOrientationLandscapeLeft
I edited the Info.plist file
<string>MainWindow</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
Make sure that in every UIViewController
/UITabBarController
etc., in the shouldAutoRotateToInterfaceOrientation
, the return says return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight))
;.
精彩评论