devedbox / AXWebViewController

AXWebViewController is a webViewController to browse web content inside applications. It’s a lightweight controller on iOS platform based on WKWebView (UIWebView would be the base Kit under iOS 8.0). It added navigation tool bar to refresh, go back, go forward and so on. It support the navigation style on WeChat. It is a simple-using and convenient web view controller using inside applications.
MIT License
797 stars 133 forks source link

網頁上有tel: 會無法撥打電話 #20

Closed tentenlee100 closed 7 years ago

tentenlee100 commented 7 years ago

可否在 - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 加上這段


    if ([navigationAction.request.URL.scheme isEqualToString:@"tel"]) {
        decisionHandler(WKNavigationActionPolicyCancel);

        NSString * mutStr = [NSString stringWithFormat:@"telprompt://%@",navigationAction.request.URL.resourceSpecifier];
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mutStr] options:@{} completionHandler:^(BOOL success) {}];
        } else {
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mutStr]];
        }

        return;
    }

出自於 http://www.jianshu.com/p/e65137ced997

devedbox commented 7 years ago

可以,我会在近期更新,或者你可以提一个pr给我!

devedbox commented 7 years ago

@tentenlee100 试试这个版本有没有解决问题呢:tag0.4.3

tentenlee100 commented 7 years ago

要不要把email也放進去? 一些系統的功能

devedbox commented 7 years ago

@tentenlee100 下个版本加