美文网首页
WKWebview H5弹框问题

WKWebview H5弹框问题

作者: 王家小雷 | 来源:发表于2017-12-29 16:08 被阅读26次
    • (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler {
      NSLog(@"runJavaScriptAlertPanelWithMessage");
      UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"" message:message delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
      [alert show];
      completionHandler();
      }

    • (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL))completionHandler {
      NSLog(@"runJavaScriptConfirmPanelWithMessage");
      completionHandler(NO);
      }

    相关文章

      网友评论

          本文标题:WKWebview H5弹框问题

          本文链接:https://www.haomeiwen.com/subject/rzaigxtx.html