ConnectionEditViewController

ConnectionEditViewController

我有一个试图将其显示为UIModalPresentationFormSheet的视图控制器,但是它不显示其UIToolbar。如何在其上显示工具栏?

ConnectionEditViewController * connectionEditViewController = [[ConnectionEditViewController alloc] initWithNibName:@"ConnectionEditViewController" bundle: nil];
connectionEditViewController.modalInPopover = YES;
connectionEditViewController.modalPresentationStyle = UIModalPresentationFormSheet;
connectionEditViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController: connectionEditViewController animated: YES];

最佳答案

创建一个UINavigationController实例,将rootViewController设置为connectionEditViewController,然后为UINavigationController配置模式属性并将其显示。

如果是在iPad上,则应在顶部弹出带有导航栏的灰色工具栏视图。
配置connectionEditViewController的navigationItem以配置导航栏。

关于ios - presentModalViewController不显示工具栏?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4291656/

10-12 00:23
查看更多