0
votes

at the moment i have developed an ios tab bar application the rotates perfectly on the iphone simulator(ios 6.1). The problem is that when i run the app on my real device (ios 4.3), the app works perfectly but it doesn't rotate.

Has anyone got any ideas? Is it possible to support rotation for all three o.s's: ios4, ios5 and ios6?

1
Rotation changed quite a bit as of iOS 6.0. Did you implement all of the proper pre-iOS 6.0 rotation methods in your view controllers in addition to the iOS 6 methods? Read the UIViewController reference docs for details.rmaddy
Yep that did it. I just added - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return YES; } to all of my .m files and now everything is working correctly.Thank you very much.puntotuning

1 Answers

1
votes

Prior to iOS 6 i.e in iOS 5 and earlier, an app and a view controller’s default supported interface orientations are set to UIInterfaceOrientationPortrait for iPhone idiom & UIInterfaceOrientationLandscape for iPad idiom while in iOS 6 and later this is UIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom.

This might be the reason for your views not rotating in < iOS 6.0. Rotation process and responsible controllers are also different in the 2. Autorotation is clearly explained here in this post- Autorotation in iOS