【发布时间】:2015-11-02 06:55:58
【问题描述】:
由于我找不到有关此案的任何信息,我想我做错了什么,但不知道为什么。
我有:
NavigationController -> (root view) UIViewController (1st) -> (here is a segue) -> UITabBarController (2nd) -> UIViewController
我想在将2nd 推入导航控制器堆栈时从1st UIView 切换到2nd UIView。
当我在 prepareForSegue 中执行 pushViewController 时
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if (segue.identifier == "mySegue") {
self.navigationController?.pushViewController(segue.destinationViewController, animated: true)
}
}
我有异常
应用程序试图以模态方式呈现活动控制器
(这很明显,因为我用导航控制器制作了push,然后继续尝试再次呈现相同的视图)
如何在导航控制器中同时使用 segue?
谢谢!
UPD。如答案中所述,已弃用的 Segue 类型“Push”(不是“显示(例如 Push)”)完全符合我的要求,但已被弃用......有什么“好”的方法吗?
【问题讨论】:
标签: ios swift uiview uinavigationcontroller