0
votes

Does anyone know of a reason why an iPhone would autorotate on one device, but not another? I can't reproduce it on my iPhone, iPod Touch, or any of the simulator devices.

Are there any device settings I should be paying attention to? The offending iPhone has the same SDK version installed (4.2.1), but is a different model (MC319LL) than mine (MC605DN).

2
Getting the obvious out of the way: The rotation lock isn't on, is it? - Wevah
Hmm, I wasn't aware of the rotation lock. Unfortunately, I'm still not able to reproduce the autorotation on my phone after enabling/disabling it. - Edward Dale

2 Answers

0
votes

Well, I never figured out why the two phones were acting differently, but this bit of code in in the UITabBarController subclass seems to have solved things:

- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return toInterfaceOrientation == UIInterfaceOrientationPortrait;
}
0
votes

You made sure that the misbehaving device had its rotation lock turned off in the settings, right?