I want to support UIInterfaceOrientationLandscapeR

2019-02-26 06:50发布

how do I make sure that UIInterfaceOrientationPortraitRight and UIInterfaceOrientationPortraitLeft are not supported.

Basically I want my 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>

1条回答
Juvenile、少年°
2楼-- · 2019-02-26 07:19

Make sure that in every UIViewController/UITabBarController etc., in the shouldAutoRotateToInterfaceOrientation, the return says return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));.

查看更多
登录 后发表回答