【发布时间】:2016-10-12 18:21:53
【问题描述】:
您好,我正在尝试展示一个视图控制器并关闭我当前的模态视图,但此代码不起作用
self.dismissViewControllerAnimated(true, completion: {
let vc = self.storyboard?.instantiateViewControllerWithIdentifier("OrderViewController")
self.presentViewController(vc!, animated: true, completion: nil)
})
反之亦然在presentviewcontroller的完成块上也不起作用
编辑:替换 vc!给自己
【问题讨论】:
-
尝试使用 self.parentViewController?.presentViewController(vc!, animated: true, completion: nil)
-
@SandeepKumar 还是不行
-
你是先展示还是先解散?
标签: ios swift uiviewcontroller