I have a problem in iOS. It's support all interface orientations. But when orientation-locked modal controller is presented (by calling [self presentViewController:UIViewController animated:YES completion:nil]
), sometimes the UI orientation is messed up.
Here are the steps:
- Orientate the device so it's in portrait mode (doesn't matter portrait or upsideDown).
- Present view controller as modal controller. This controller only support landscape mode. The UI orientation obviously rotated to landscape. Keep the device in portrait (since the controller is forced to landscape, the UI will still show a landscape UI eventhough the device is in portrait).
- Dismiss the modal controller. Now the main UI is in landscape mode. The problem is, this main UI is supporting all orientations (like stated above).
- After doing some interaction (without changing the device orientation), the device orientation suddenly back to portrait, but the UI does not follow suit.
Here's how the final screenshot:
My current thought is that this is iOS bug. I want to look for another opinions regarding this bug. I've search around the net (bing and google) and found nothing.