xiubojin / JXBWKWebView

An component WebView for iOS base on WKWebView
MIT License
736 stars 115 forks source link

你好,你的demo如何拦截URL,为啥回调没有响应 #42

Closed Travis990 closed 5 years ago

Travis990 commented 5 years ago

image

xiubojin commented 5 years ago

这个方法在最新的版本中已经没有了,你想用它做什么?

Travis990 commented 5 years ago

我下载就是你的GitHub上最新的版本,就是做网站里面的url链接的获取

Travis990 commented 5 years ago

帅哥 ,有没有遇到过这种问题, image 人机身份验证,API参数无效

xiubojin commented 5 years ago

你截图截错了。

设置属性值:self.needInterceptRequest = YES; 拦截URL: - (void)interceptRequestWithNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { NSLog(@"当前加载的url:%@", navigationAction.request.URL); decisionHandler(WKNavigationActionPolicyAllow); }

Travis990 commented 5 years ago

我添加了这个属性值,浏览器加载不了,这是为啥?

xiubojin commented 5 years ago

这个页面是你首次请求的页面吗?页面的URL是多少?我试试,或者你+我vx:408205555