我遇到过这个警告:
PushViewController:animated:在现有转换或演示文稿运行时调用
发生;导航堆栈不会更新。
当试图打电话时navigationController?.popViewControllerAnimated(false)
from UIAlertController
完成块。
此警告表明您正在尝试使用UINavigationController
错:
PushViewController:animated:在现有转换或演示发生时调用;导航堆栈不会更新
您在评论中提到您正在尝试pop
the
ViewController
使用
navigationController?.popViewControllerAnimated(false)
内部完成块UIAlertController
。因此,你试图从错误的观点中解脱出来,UIAlertController
不属于UINavigationController
stack.
尝试并关闭UIAlertController
首先,然后弹出当前ViewController
。换句话说,删除pop
来自completion
块并将其放入OK
堵塞。或使用unwind
在警报之前继续。
另一种可能性是,您在其中有未使用或相同的重复项storyboard
。因此,如果unwinding
操作由以下条件触发storyboard
按钮,选择该按钮并检查connectivity inspector
并删除了不需要的连接。
For example: the red x marked was unnecessary in my case.
![Example](https://i.stack.imgur.com/nZ281.png)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)