由于我找不到任何有关此案例的信息,我想我做错了什么,但不知道为什么。如何在同一时间使用导航控制器的segue?
我: NavigationController -> (root view) UIViewController (1st) -> (here is a segue) -> UITabBarController (2nd) -> UIViewController
我要让SEGUE从1st UIView
到2nd UIView
同时推2nd
到导航控制器堆栈。
当我在做pushViewController内prepareForSegue
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if (segue.identifier == "mySegue") { self.navigationController?.pushViewController(segue.destinationViewController, animated: true) } }
我有例外
应用程序试图模态呈现主动控制器
(这是显而易见的,因为我用导航控制器制作了push
,然后继续尝试呈现同样的看法)
我怎样才能同时使用导航控制器的segue?
谢谢!
UPD。正如答案中指出的那样,弃用的Segue类型“Push”(不是“Show(例如Push)”)完全按照我的意愿工作,但它已被弃用......有没有什么“好”的方法?
>你只需要调用self.performSegueWithIdentifier(“yourSegueIdentifierHere”) - >它不适用于我。新的视图出现,但作为简单的视图,而不是像导航控制器。 – norlin
在故事板中,当您单击segue时,是否设置为Push? –
它被设置为“显示(例如推送)”,以及简单的“推送”列为“已弃用”。嗯,这个弃用的“Push”完全按照我想要的那样工作......但是我不喜欢这种情况下的“弃用”状态:-)有没有新的方法可以做到这一点? – norlin