【发布时间】:2016-08-25 10:57:08
【问题描述】:
正如您在下面看到的,notificationsVC 是 TabBarController 的一部分,它嵌入在 navigationContoller 中(我们先称它为 nC)。然后是从notificationsVC 到第二个navigationController 的segue,它将显示messagesVC。
messagesVC 中有一个返回按钮,按下该按钮应返回到 notificationsVC
func backbutton() {
navigationController?.popViewControllerAnimated(true)
}
现在这显然不起作用,因为 navigationController 将获取最近的 NC 并将 VC 弹出它的堆栈,但它不会让我回到 notificationsVC。
还有其他选择吗?尽管我也尝试过,但也没有成功。
self.dismissViewControllerAnimated(true, completion: nil);
另外我正在使用JSQMessagesViewController 库来显示messagesVC 中的消息,这无关紧要,但仍然值得一提。感谢您的宝贵时间!
【问题讨论】:
-
navigationController?.navigationController?.popViewControllerAnimated(true)从 NavigationController 的 NavigationController 弹出视图。
标签: ios swift uinavigationcontroller storyboard popviewcontroller