I am creating an application that only supports landscape orientation on the iPad under iOS 4.3, although the error was also present in iOS 4.2.
A few places in the application, I show the UIViewController as modal views. All of them are shown using this template:
viewController.modalPresentationStyle = UIModalPresentationFormSheet; viewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:viewController animated:YES];
In most cases, they work as expected β the modal shape of the sheet slides up from the bottom of the screen.
However, in two cases, the sheet of modal shape moves in the lower left corner of the screen. The form sheet slides almost completely to the right, and the bottom of the form sheet goes out of view. If you focus the text field and show the on-screen keyboard, the form sheet moves to the upper center of the screen, where you expect it to be.
I donβt think that simulated XIB metrics influence their behavior, but I set the orientation for all of them (both the calling UIViewController self and the modal view controller viewController ) in landscape orientation.
Any ideas why these two modal form sheets behave differently than the others?
source share