popViewController(animated:) 在某些情况下,如果animated为true会失效。改成false可以正常使用。
Parameters
animated
Set this value to true to animate the transition. Pass false if you are setting up a navigation controller before its view is displayed.
animated参数这么注释的。大约的意思就是,如果view还没display,要false
以后,复杂逻辑的跳转,尽量false,可以规避一些问题。