#问题描述:
在ViewController中
当我在弹出UIAlertController的弹出框时,同时调用了 [self.navigationController popViewControllerAnimated:YES];这个方法
导致
popViewControllerAnimated: called on <UINavigationController 0x10201e600> while an existing transition or presentation is occurring; the navigation stack will not be updated.
#分析原因
iOS8.0以后 UIAlertController弹出的动画效果,跟popViewController的动画效果冲突,导致无法正常Pop
#解决方案
##1. UIAlertController弹出以后0.5秒Pop
DispatchQueue.main.asyncAfter(deadline: 0.5) {
self.navigationController?.popViewController(animated: true)
}
##2. UIAlertController消失以后在Pop