In iOS, after dismissing a modal view controller (which is being forced to only show in portrait orientation), if the device is being held in landscape mode, the view controller which presented the modal view controller doesn't rotate back to landscape correctly.
The 'willAnimateRotationToInterfaceOrientation' method gets called so I can manage rotation of my subviews etc. but then the actual view controller doesn't rotate to landscape. So my subviews look like they should in landscape, but the interface is in portrait mode.
The annoying thing is that it works fine in the iOS 5 simulator. Ie. After dismissing the modal view controller, the presenting view controller rotates back to landscape orientation.
Has anyone experienced something similar, or have any idea how to approach this?
shouldAutorotate
,supportedInterfaceOrientations
andpreferredInterfaceOrientationForPresentation
– Sergey Kuryanov