DLPanableWebViewHandler代理中直接调用[navPanTarget_ performSelector:navPanAction_ withObject:pan];会使得程序假死。
andybin-cn opened this issue · comments
如果WebView是在navigationController的RootViewController中,在DLPanableWebViewHandler的代理中直接调用[navPanTarget_ performSelector:navPanAction_ withObject:pan];会使得程序假死。
我的处理方式:
- (void)DLPanableWebView:(DLPanableWebView *)webView panPopGesture:(UIPanGestureRecognizer *)pan{
if ( self.navigationController.viewControllers.count < 2 && self == [self.navigationController.viewControllers objectAtIndex:0] )
{
return;
}
if (navPanTarget_ && [navPanTarget_ respondsToSelector:navPanAction_]) {
[navPanTarget_ performSelector:navPanAction_ withObject:pan];
}
}