I have an iPad app that should support iOS 5.0 and later. I have a bug that behaves differently in 5.0 / 5.1 than in 6.0. The problem is the view controller in the tabbarcontroller, which pushes the modal view, which in turn causes a full-screen view using the navigationController. The problem is that if in full-screen mode, if the iPad is rotated, the basic view manager (one in the tabbar controller) does not rotate. Now let me break down the differences in iOS versions:
First of all, this viewController in question implements shouldAutoRotateToInterfaceOrientation (returns YES), as well as willRotateToInterfaceOrientation and willAnimateRotationToInterfaceOrientation.
In iOS 6.0, I noticed that the rotation methods (willRotate ... and willAnimate ...) were not called, so I registered it to receive the UIDeviceOrientationDidChangeNotification notification and executed the code from the two Rotate methods if I received this notification and the other methods did not execute. This fixed the issue in iOS 6.0.
The problem is that in 5.0 / 5.1 the rotation methods (willRotate ... and willAnimate ...) are executed, but the view does not rotate. If the βfull screen viewβ is not presented on top of this view controller and the iPad rotates, these two methods are executed, and the views rotate accordingly.
Please, help. Thanks in advance.
Things I tried other than the above.
I tried to check the UIDeviceOrientation and convert it to UIInterfaceOrientation and call [self shouldAutorotateToInterfaceOrientation: xxx]; The view is still not displayed correctly.
source share