From 98ceb654d6e4b7a882fbec513bb192d1cea382d4 Mon Sep 17 00:00:00 2001 From: devedbox <862099730@qq.com> Date: Mon, 9 Jan 2017 21:48:32 +0800 Subject: [PATCH] Added 'file' scheme. --- AXWebViewController.podspec | 4 ++-- AXWebViewController/AXWebViewController/AXWebViewController.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AXWebViewController.podspec b/AXWebViewController.podspec index b51fd46..d5dbbe1 100644 --- a/AXWebViewController.podspec +++ b/AXWebViewController.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "AXWebViewController" -s.version = "0.4.0" +s.version = "0.4.1" s.summary = "A light weight web view controller in iOS." # This description is used to generate tags and improve search results. @@ -83,7 +83,7 @@ s.platform = :ios, "7.0" # Supports git, hg, bzr, svn and HTTP. # -s.source = { :git => "https://github.com/devedbox/AXWebViewController.git", :tag => "0.4.0" } +s.source = { :git => "https://github.com/devedbox/AXWebViewController.git", :tag => "0.4.1" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # diff --git a/AXWebViewController/AXWebViewController/AXWebViewController.m b/AXWebViewController/AXWebViewController/AXWebViewController.m index 3690b63..e576dbb 100644 --- a/AXWebViewController/AXWebViewController/AXWebViewController.m +++ b/AXWebViewController/AXWebViewController/AXWebViewController.m @@ -929,7 +929,7 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati } decisionHandler(WKNavigationActionPolicyCancel); return; - } else if (![[NSPredicate predicateWithFormat:@"SELF MATCHES[cd] 'https' OR SELF MATCHES[cd] 'http'"] evaluateWithObject:components.scheme]) {// For any other schema. + } else if (![[NSPredicate predicateWithFormat:@"SELF MATCHES[cd] 'https' OR SELF MATCHES[cd] 'http' OR SELF MATCHES[cd] 'file'"] evaluateWithObject:components.scheme]) {// For any other schema. if ([[UIApplication sharedApplication] canOpenURL:webView.URL]) { [[UIApplication sharedApplication] openURL:webView.URL]; }