views:

87

answers:

0

Hello,

I'm having quite interesting (but very annoying) problem with (not only) UI autorotation. I'm working on the app which contains tabbar controller with couple of navigation controllers as tab items. One of those controllers allows for autorotation to landscape mode.

Interesting is that it perfectly works in Simulator as well as on my own device, but it's not working on other testing devices. All devices are the same - iPhone 3G 16 GB, OS version 3.1.3.

When I'm looking for a log messages which report orientation change events in console, I can find it again only on my device, but not on other devices, so it seems that other devices do not report orientation change at all. Which is very unlikely on the other hand, because other apps are working normally... Also some other features which are working on my phone are not working on other devices too (touch events handling in tableview for instance).

I've never seen something like this and cannot find any reason why the hell it should not work on all devices the same way! So the question is - am I mad or what?

I use subclass of UITabBarViewController with overriden method

- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation {
    BOOL shouldRotate = (toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft);

    NSLog(@"Should rotate: %d", shouldRotate);
    return shouldRotate;
}

Then I handle orientation change animation in respective methods (willRotate..., willAnimateRotation...). But as I said - it works fine on my device, but on other devices the shouldAutorotateToInterfaceOrientation: method gets never called. Weird!

Please give me some hint before I'll end in a madhouse. Thanks for any tip.