Skip to content

Commit

Permalink
当webView 跳转 是新建窗口打开时,WKWebView不能响应的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lengain authored May 29, 2018
1 parent 3349738 commit 1a35003
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Classes/IMYWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,16 @@ - (void)webView:(WKWebView*)webView didFailNavigation:(WKNavigation*)navigation
{
[self callback_webViewDidFailLoadWithError:error];
}

#pragma mark - WKUIDelegate
///-- 还没用到

- (nullable WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures {
if (!navigationAction.targetFrame.isMainFrame) {
[webView loadRequest:navigationAction.request];
}
return nil;
}

#pragma mark - CALLBACK IMYVKWebView Delegate

- (void)callback_webViewDidFinishLoad
Expand Down

1 comment on commit 1a35003

@8825
Copy link

@8825 8825 commented on 1a35003 Jan 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i

Please sign in to comment.