iPadバージョンには次の問題があります。
UITabBar内にNavigationControllerがあります。電子メールフォームに似たルックアンドフィールのフォームを表示したい。
同じコードを使用して、モデルを中心に表示します。
// View to be displayed in the modal
AdhocViewController *controller = [[AdhocViewController alloc] initWithNibName:@"AdhocViewController" bundle:[NSBundle mainBundle]];
controller.caller = self;
// The form will need a navigation bar to cancel or save the form
UINavigationController *modalViewNavController = [[UINavigationController alloc]
initWithRootViewController:controller];
// Configurate the modal presentation and transition
modalViewNavController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
modalViewNavController.modalPresentationStyle = UIModalPresentationFormSheet;
// Show the new view
[self presentModalViewController:modalViewNavController animated:YES];
このコードはポートレートモードでは完全に機能しますが、ランドスケープではビューが部分的に画面の外に表示されます...そしてそれを解決する方法はまだ見つかりませんでした。
ここで見つけたソリューションのいくつかをテストします...
モデルビューをプリセットしてサイズを変更した後、次の行を追加してみてください。ただし、うまくいきません。
controller.view.superview.frame = CGRectMake(0, 0, 600, 700);
controller.view.superview.center = self.view.center;
なにか提案を?
ありがとう、
イワン
StackOverflowの参照: