views:

344

answers:

2

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  A: 

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

jrtc27
A: 

I'm pretty sure your app will be rejected if it doesn't do SOMETHING in portrait mode. I believe that it's a requirement for iPad apps to be rotatable to all 4 orientations.

Jim
not true... this requirement has been relaxed. i have an app that only runs in landscape. (for the ipad)
Aran Mulholland
I know of one case where an iPad app that handled only one orientation was accepted prior to the iPad release. However, it was subsequently rejected when being resubmitted following a minor bug fix, because it only handled one orientation.
Jim
iPad apps can run in Landscape mode only. Plants vs Zombie is a game. It only works in Landscape. Billboardz: Road Rage is another app.But it has to support both Landscape orientations for Apple to accept it.I want to be able to determine the current orientation and then determine if it's been flipped. I'm relatively new to this so if you have code examples, I'd appreciate it.
Cocoa Dev