カスタムモーダルビューコントローラーを備えたアプリケーションがあり、このコントローラーはナビゲーションコントローラー内にあります。ここに私のコードがあります:
CalendarViewController *calendarViewController = [[CalendarViewController alloc] initWithNibName:@"CalendarViewController" bundle:nil];
[calendarViewController setDelegate:self];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:calendarViewController];
[navigationController setModalPresentationStyle:UIModalPresentationFormSheet];
[navigationController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentModalViewController:navigationController animated:YES];
navigationController.view.superview.frame = CGRectMake(0, 0, 630, 555);
navigationController.view.superview.center = self.view.center;
問題は、このナビゲーション コントローラーが画面の中央にないことです。この画面の位置はiPadの右側です。このカスタムコントローラーを中央に配置する方法はありますか? どうもありがとう。