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 = UIInterfaceOrientationIsL开发者_如何转开发andscape(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?
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...
精彩评论