【发布时间】:2014-12-17 22:23:07
【问题描述】:
我想在我的视图控制器堆栈上返回两个级别。我按此顺序设置了三个序列:Show、Show、Present Modally。有一个导航控制器正在使用中。从我的第四个视图我想回到第二个视图。我试过使用
self.presentingViewController?.presentingViewController?.navigationController?.popViewControllerAnimated(false);
和
self.presentingViewController?.presentingViewController?.dismissViewControllerAnimated(false, completion: nil);
第二个仅在第二个和第三个连续为“当前模态”时才有效。我怎样才能让他们与解雇和流行一起工作?
【问题讨论】:
-
似乎你必须在弹出其他两个之前关闭呈现的视图控制器。
-
你可以使用 unwind segue 代替。
-
@rdelmar 如果您使用情节提要,您只能使用展开转场,对吧?
-
@LyndseyScott,没错。
标签: ios swift uiviewcontroller popviewcontrolleranimated