2010-04-15 19 views
2

我如何确保不支持UIInterfaceOrientationPortraitRight和UIInterfaceOrientationPortraitLeft。我想支持UIInterfaceOrientationLandscapeRight和UIInterfaceOrientationLandscapeLeft只有

基本上我想只用于UIInterfaceOrientationLandscapeRight和UIInterfaceOrientationLandscapeLeft

我的应用程序编辑的Info.plist文件

<string>MainWindow</string> 
<key>UISupportedInterfaceOrientations</key> 
<array>   
     <string>UIInterfaceOrientationLandscapeLeft</string> 
     <string>UIInterfaceOrientationLandscapeRight</string> 
</array> 

回答

4

确保在每一个UIViewController/UITabBarController等,在shouldAutoRotateToInterfaceOrientation,回报说return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));。

相关问题