正如标题所说,我想从一个已存在于UIPopoverController中的UIViewController中显示另一个UIViewController。 我尝试了以下方法:
_secondViewController = new SecondViewController();
this.ModalPresentationStyle = UIModelPresentationStyle.CurrentContext;
this.ModelInPopover = true;
this.PresentModelViewController(_secondViewController, true);
然而,secondViewController 被显示在主视图控制器中,而不是弹出控制器中。
在这篇文章中,有人提到这是不可能的,并且违反了 HIG。然而,我在其他应用程序中也看到过这种情况(例如 Yahoo! 邮件),如果我没有记错的话。
我还在考虑另一种方法:如果我可以在弹出上下文中创建一个 UINavigationController,通过向 NavigationController 添加新的 ViewController,它可能会起作用。但是如何实现呢?