假如我有一个ViewController为MainVC,MainVC里两个按钮分别Trigger了两个Push Segue,Push到一个含有WebView的WebViewVC。两个Segue对应不同的Request地址。
我想做到假如WebView载入了某些地址,那么自动Pop回MainVC,MainVC embedded in NavigationController。
WebViewVC property如下
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@property (weak, nonatomic) UINavigationController *source;
source属性在MainVC的prepareForSegue时指向MainVC
WebViewVC收到didFinish事件后判断,然后[self.source.navigationController popViewControllerAnimated: YES]
结果:
第一次成功,第二次失败,错误提示:
nested pop animation can result in corrupted navigation bar
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
于是我改成了[self dismissViewControllerAnimated:YES completion:nil],根本没有反应。
请问大家应该怎么解决?
我想做到假如WebView载入了某些地址,那么自动Pop回MainVC,MainVC embedded in NavigationController。
WebViewVC property如下
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@property (weak, nonatomic) UINavigationController *source;
source属性在MainVC的prepareForSegue时指向MainVC
WebViewVC收到didFinish事件后判断,然后[self.source.navigationController popViewControllerAnimated: YES]
结果:
第一次成功,第二次失败,错误提示:
nested pop animation can result in corrupted navigation bar
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
于是我改成了[self dismissViewControllerAnimated:YES completion:nil],根本没有反应。
请问大家应该怎么解决?