我的应用程序基于导航控制器。形成第二个ViewController我会弹出一个带有TableViewController的弹出,我的popover应该忽略一行(在某些情况下/在某些情况下保留)并且应该显示一个自定义视图控制器。这个过程必须在一个共同的地方,所以我不能在这里有任何代表。
获取顶级viewController我使用以下mtd
+ (UIViewController*) topView
{
UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController;
while (topController.presentedViewController)
{
topController = topController.presentedViewController;
}
return topController;
}
警告:尝试显示其视图不在窗口层次结构中!
现在我的问题是我想在当前执行完成后呈现我的newViewController。