Rob Bonner
Rob Bonner

Reputation: 9426

Odd iPad rotation effect

I have a pretty standard iPad application that is setup to only be landscape. To affect this, I have set the initial interface orientation to landscape, and the support interface orientations to just the single landscape left home button, and also overridden shouldAutorotateToInterfaceOrientation properties to the following:

 -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
    BOOL b = UIInterfaceOrientationIsLandscape(interfaceOrientation);
    return b;
}

The really odd thing is that when the app starts out, it is correct, and rotating the iPad upside down does nothing, but rotating with the home button down rotates the screen, but once rotated, it will never rotate back, so thinking this is something other than rotation settings.

Has anyone run into this before?

Upvotes: 0

Views: 128

Answers (1)

Peter Sarnowski
Peter Sarnowski

Reputation: 11970

From the docs:

#define UIInterfaceOrientationIsLandscape(orientation) \
   ((orientation) == UIInterfaceOrientationLandscapeLeft || \
   (orientation) == UIInterfaceOrientationLandscapeRight)

So if you want to support just ONE of the landscape rotations, this is not the way to go...

Upvotes: 1

Related Questions