0
votes

I've made a puzzle game ('WordBatch', available in the App store) and thought I had forced portrait orientation but its still rotating to landscape mode, though only the iPad. In XCode I specified it as a 'Universal' App, for all devices, and checked portrait mode only in the General tab. Even in the plist file portrait is the only orientation specified. I've tried all the suggestions in StackOverflow on this subject, but to no avail. The current code I have on place is this bit in my AppDelegate:

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
     return UIInterfaceOrientationMaskPortrait;
  }

and the following is in my root view controller:

 -(BOOL)shouldAutorotate {
    return NO;
 }

but it still rotates to landscape. Any help here would be great.

1
handle orientation change of navigation controller - Sheshnath
Thanks I'll try that out. - jdeckman

1 Answers

0
votes

You can try by applying this check:

 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
 // The device is an iPad.
}
else
{
 // The device is an iPhone or iPod.
 }