【发布时间】:2017-09-07 09:10:37
【问题描述】:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Tried to pop to a view controller that doesn't exist.'
使用此代码时
self?.navigationController?.popToViewController(vc2, animated: true)
但是当我尝试简单地弹出它的工作时
self?.navigationController?.popViewController(animated: true)
我正在推动这个 viewController 像
navigationController?.pushViewController(vc2, animated: true)
我不确定,推送视图意味着当我尝试做popToViewController 时。它上面有一个视图。请帮忙
【问题讨论】:
-
可能是两个对象在推送和弹出时都不相同。能否请您显示您推送的位置和弹出位置的代码。
标签: ios swift uiviewcontroller uinavigationcontroller