I have a UIViewController that implements
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Then I try to derive a modal on top of this view:
ModalViewController *modalViewController = [[ModalViewController alloc] init];
modalViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
modalViewController.modalPresentationStyle = UIModalPresentationFormSheet;
[mainViewController presentModalViewController:modalViewController animated:YES];
If I run modal and ipad in portrait, it works fine. But when I hold it in the landscape and try to launch the modal, the modal appears half on the screen in the upper right corner of the ipad. Any ideas?
source
share