iOS关于webview内部点击超文本链接无法跳转问题
2019-12-10 本文已影响0人
dose_爽
需要遵守<WKNavigationDelegate>并实现以下代理方法
- (void) webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void(^)(WKNavigationActionPolicy))decisionHandler{
if(navigationAction.targetFrame == nil) {
[webViewloadRequest:navigationAction.request];
}
decisionHandler(WKNavigationActionPolicyAllow);
}