出現(xiàn)點(diǎn)擊沒有反應(yīng)钠绍,無法進(jìn)入詳情,可能是因?yàn)樵趈s頁面里的a標(biāo)簽花沉,其中target
參數(shù)設(shè)置為_blank
<a href='#' target='_blank' >
需要在WKWebView里面實(shí)現(xiàn)
-(void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler{
//如果是打開一個(gè)新頁面柳爽,需要重新加載
if (navigationAction.targetFrame == nil) {
[webView loadRequest:navigationAction.request];
}
decisionHandler(WKNavigationActionPolicyAllow);
}