According to apple my application has to be able to run in both portrait modes. How do I accomplish this with shouldAutorotateToInterfaceOrientation??
+3
A:
Just return YES no matter what the interface orientation is. This will allow the system autorotate to the upside-down orientation.
If you don't want to support the landscape orientations, then return:
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
KennyTM
2010-04-27 13:49:39
I don't want the user to be able to play in landscape mode, it doesn't work right. I just want the two portrait modes
NextRev
2010-04-27 13:50:57
@Next: See update.
KennyTM
2010-04-27 13:52:54
+1
A:
This code allows any orientation except landscape:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
{
return (orientation != UIDeviceOrientationLandscapeLeft) &&
(orientation != UIDeviceOrientationLandscapeRight);
}
progrmr
2010-04-27 13:53:42
A:
Thanks for your answer 'progrmr'.
At this time iPad 3.2 coding should use interfaceOrientation instead of just orientation.
Tom Sgro
2010-09-06 22:41:01