私は実装するUIViewControllerを持っています
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
次に、そのビューの上にモーダルをポップアップしようとします。
ModalViewController *modalViewController = [[ModalViewController alloc] init];
modalViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
modalViewController.modalPresentationStyle = UIModalPresentationFormSheet;
[mainViewController presentModalViewController:modalViewController animated:YES];
iPadが縦向きのときにモーダルを起動すると、正常に動作します。しかし、私がそれを横向きに持ってモーダルを起動しようとすると、モーダルはiPadの右上の画面の半分に表示されます。何か案は?