From 2a2ac9cce54d9aa438a27e35f313ec2b70294244 Mon Sep 17 00:00:00 2001 From: CircleCI Date: Tue, 28 Apr 2020 09:20:42 -0400 Subject: [PATCH 1/7] Removes UIWebView --- src/ios/NativePageTransitions.m | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/ios/NativePageTransitions.m b/src/ios/NativePageTransitions.m index 0645167..ebcb044 100644 --- a/src/ios/NativePageTransitions.m +++ b/src/ios/NativePageTransitions.m @@ -718,10 +718,6 @@ - (UIImage*) grabScreenshot { } - (BOOL) loadHrefIfPassed:(NSString*) href { - UIWebView *uiwebview = nil; - if ([self.webView isKindOfClass:[UIWebView class]]) { - uiwebview = ((UIWebView*)self.webView); - } if (href != nil && ![href isEqual:[NSNull null]]) { if (![href hasPrefix:@"#"]) { // strip any params when looking for the file on the filesystem @@ -735,11 +731,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { } NSURL *url; NSURL *origUrl; - if (self.wkWebView != nil) { - origUrl = self.wkWebView.URL; - } else { - origUrl = uiwebview.request.URL; - } + origUrl = self.wkWebView.URL; if([origUrl.scheme isEqualToString:@"file"]) { NSString *currentUrl = origUrl.absoluteString; NSRange lastSlash = [currentUrl rangeOfString:@"/" options:NSBackwardsSearch]; @@ -761,12 +753,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; - // Utilize WKWebView for request if it exists - if (self.wkWebView != nil) { - [self.wkWebView loadRequest: urlRequest]; - } else { - [uiwebview loadRequest: urlRequest]; - } + [self.wkWebView loadRequest: urlRequest]; } else if (![href hasPrefix:@"#"]) { CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"href must be null, a .html file or a #navigationhash"]; [self.commandDelegate sendPluginResult:pluginResult callbackId:_command.callbackId]; @@ -774,11 +761,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { } else { // it's a hash, so load the url without any possible current hash NSString *url = nil; - if (self.wkWebView != nil) { - url = self.wkWebView.URL.absoluteString; - } else { - url = uiwebview.request.URL.absoluteString; - } + url = self.wkWebView.URL.absoluteString; // remove the # if it's still there if ([url rangeOfString:@"#"].location != NSNotFound) { @@ -790,11 +773,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { // and load it NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; - if (self.wkWebView != nil) { - [self.wkWebView loadRequest: urlRequest]; - } else { - [uiwebview loadRequest: urlRequest]; - } + [self.wkWebView loadRequest: urlRequest]; } } return YES; From 76f0b7b506501f416a6ab4bb1d0177a46a5edcac Mon Sep 17 00:00:00 2001 From: Tommy Lacroix Date: Tue, 5 May 2020 16:43:11 -0400 Subject: [PATCH 2/7] ITMS-90809 --- README.md | 17 +- package.json | 17 +- plugin.xml | 47 ++-- src/ios/NativePageTransitions.m | 10 +- src/winphone/NativePageTransitions.cs | 340 -------------------------- 5 files changed, 36 insertions(+), 395 deletions(-) delete mode 100644 src/winphone/NativePageTransitions.cs diff --git a/README.md b/README.md index 6815fdd..cc45bc4 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,22 @@ -## Native Page Transitions Cordova / PhoneGap Plugin -by [Telerik](http://www.telerik.com) +# Native Page Transitions Cordova / PhoneGap Plugin +Original (and now unmaintained) version by by [Telerik](https://github.com/Telerik-Verified-Plugins/NativePageTransitions) +## Fixes since Telerik version - - - - - -
Marketplace logoFor a quick demo app and easy code samples, check out the plugin page at the Verified Plugins Marketplace: http://plugins.telerik.com/plugin/native-page-transitions
+* ITMS-90809: UIWebView API Deprecation +## Installation Using the Cordova CLI? ``` -cordova plugin add com.telerik.plugins.nativepagetransitions +cordova plugin add cordova-plugin-nativepagetransitions ``` Using PGB? ```xml - + ``` [The MIT License (MIT)](http://www.opensource.org/licenses/mit-license.html) diff --git a/package.json b/package.json index 24465b7..d65c7d7 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,11 @@ { - "version": "0.6.5", - "name": "com.telerik.plugins.nativepagetransitions", + "version": "0.6.6", + "name": "cordova-plugin-nativepagetranslations", "cordova_name": "Native Page Transitions", "description": "Slide out the current page to reveal the next one. By a native transitions.", "license": "MIT", - "author": "Telerik / Eddy Verbruggen (https://github.com/EddyVerbruggen)", - "repo": "https://github.com/Telerik-Verified-Plugins/WKWebView.git", - "issue": "https://github.com/Telerik-Verified-Plugins/WKWebView/issues", + "author": "Original version by Telerik / Eddy Verbruggen (https://github.com/EddyVerbruggen)", + "repo": "https://github.com/tlacroix/NativePageTransitions.git", "keywords": [ "Native transitions", "Native page transitions", @@ -17,15 +16,11 @@ "Curl", "ecosystem:cordova", "cordova-android", - "cordova-ios", - "cordova-wp8", - "cordova-windows" + "cordova-ios" ], "platforms": [ "ios", - "android", - "wp8", - "windows" + "android" ], "engines": [ { diff --git a/plugin.xml b/plugin.xml index a74b56d..0c2c7cf 100755 --- a/plugin.xml +++ b/plugin.xml @@ -1,28 +1,17 @@ - - + Native Page Transitions - - - Slide out the current page to reveal the next one. By a native transitions. - - - Eddy Verbruggen / Telerik - + Slide out the current page to reveal the next one. By a native transitions. + + Eddy Verbruggen / Telerik + Tommy Lacroix / NuageLab + MIT - Native transitions, Native page transitions, Slide, Flip, Drawer, Menu, Curl - - https://github.com/Telerik-Verified-Plugins/NativePageTransitions.git - - https://github.com/Telerik-Verified-Plugins/NativePageTransitions/issues - + https://github.com/tlacroix/NativePageTransitions.git - @@ -45,7 +34,7 @@ - + @@ -53,14 +42,14 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/ios/NativePageTransitions.m b/src/ios/NativePageTransitions.m index 0645167..231f7d2 100644 --- a/src/ios/NativePageTransitions.m +++ b/src/ios/NativePageTransitions.m @@ -718,9 +718,9 @@ - (UIImage*) grabScreenshot { } - (BOOL) loadHrefIfPassed:(NSString*) href { - UIWebView *uiwebview = nil; - if ([self.webView isKindOfClass:[UIWebView class]]) { - uiwebview = ((UIWebView*)self.webView); + WKWebView *uiwebview = nil; + if ([self.webView isKindOfClass:[WKWebView class]]) { + uiwebview = ((WKWebView*)self.webView); } if (href != nil && ![href isEqual:[NSNull null]]) { if (![href hasPrefix:@"#"]) { @@ -738,7 +738,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { if (self.wkWebView != nil) { origUrl = self.wkWebView.URL; } else { - origUrl = uiwebview.request.URL; + origUrl = uiwebview.URL; } if([origUrl.scheme isEqualToString:@"file"]) { NSString *currentUrl = origUrl.absoluteString; @@ -777,7 +777,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { if (self.wkWebView != nil) { url = self.wkWebView.URL.absoluteString; } else { - url = uiwebview.request.URL.absoluteString; + url = uiwebview.URL.absoluteString; } // remove the # if it's still there diff --git a/src/winphone/NativePageTransitions.cs b/src/winphone/NativePageTransitions.cs deleted file mode 100644 index 3c2baf1..0000000 --- a/src/winphone/NativePageTransitions.cs +++ /dev/null @@ -1,340 +0,0 @@ -using Microsoft.Phone.Tasks; -using Microsoft.Phone.Controls; -using WPCordovaClassLib.Cordova; -using WPCordovaClassLib.Cordova.Commands; -using WPCordovaClassLib.Cordova.JSON; -using System.Runtime.Serialization; -using System; -using System.ComponentModel; -using System.IO; -using System.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Navigation; -using WPCordovaClassLib; -using Microsoft.Xna.Framework.Media; - -namespace Cordova.Extension.Commands -{ - public class NativePageTransitions : BaseCommand - { - - public NativePageTransitions() - { - cView = getCordovaView(); - browser = cView.Browser; - //browser.Navigated += Browser_Navigated; - //browser.Navigating += Browser_Navigating; - img = new Image(); - } - - [DataContract] - public class TransitionOptions - { - [DataMember(IsRequired = true, Name = "direction")] - public string direction { get; set; } - - [DataMember(IsRequired = true, Name = "duration")] - public int duration { get; set; } - - [DataMember(IsRequired = false, Name = "slowdownfactor")] - public int slowdownfactor { get; set; } - - [DataMember(IsRequired = false, Name = "href")] - public string href { get; set; } - - [DataMember(IsRequired = false, Name = "winphonedelay")] - public int winphonedelay { get; set; } - } - - private CordovaView cView; - private WebBrowser browser; - private TransitionOptions transitionOptions; - private Image img; - private Image img2; - - public void slide(string options) - { - try - { - String jsonOptions = JsonHelper.Deserialize(options)[0]; - transitionOptions = JsonHelper.Deserialize(jsonOptions); - } - catch (Exception) - { - DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); - return; - } - - Deployment.Current.Dispatcher.BeginInvoke(() => - { - // grab a screenshot - WriteableBitmap bmp = new WriteableBitmap(browser, null); - var width = (int)bmp.PixelWidth; - var height = (int)bmp.PixelHeight; - - img.Source = bmp; - - img2 = new Image(); - img2.Source = bmp; - - // image animation - img2.RenderTransform = new TranslateTransform(); - DoubleAnimation imgAnimation = new DoubleAnimation(); - imgAnimation.Duration = TimeSpan.FromMilliseconds(transitionOptions.duration); - - string animationAxis = "X"; - double webviewAnimationFrom = 0; - int screenshotSlowdownFactor = 1; - int webviewSlowdownFactor = 1; - int imgOrdering = 0; - - if (transitionOptions.slowdownfactor < 0) { - transitionOptions.slowdownfactor = 1000; - } - - if (transitionOptions.direction == "left") - { - screenshotSlowdownFactor = transitionOptions.slowdownfactor; - webviewAnimationFrom = width; - imgAnimation.To = -width / screenshotSlowdownFactor; // Application.Current.Host.Content.ActualWidth; - } - else if (transitionOptions.direction == "right") - { - webviewSlowdownFactor = transitionOptions.slowdownfactor; - webviewAnimationFrom = -width; - imgAnimation.To = width; // Application.Current.Host.Content.ActualWidth; - imgOrdering = 1; - } - else if (transitionOptions.direction == "up") - { - animationAxis = "Y"; - screenshotSlowdownFactor = transitionOptions.slowdownfactor; - webviewAnimationFrom = height; - imgAnimation.To = -height / screenshotSlowdownFactor; // Application.Current.Host.Content.ActualHeight; - } - else if (transitionOptions.direction == "down") - { - animationAxis = "Y"; - webviewSlowdownFactor = transitionOptions.slowdownfactor; - webviewAnimationFrom = -height; - imgAnimation.To = height; // Application.Current.Host.Content.ActualHeight; - imgOrdering = 1; - } - - // inserting the image at index 0 makes it appear below the webview, - // but we need to set it to 1 first so the webview is hidden and can be updated - cView.LayoutRoot.Children.Insert(1, img); - cView.LayoutRoot.Children.Insert(imgOrdering, img2); - - - // now load the new content - if (transitionOptions.href != null && transitionOptions.href != "" && transitionOptions.href != "null") - { - String to = transitionOptions.href; - Uri currenturi = browser.Source; - string path = currenturi.OriginalString; - if (to.StartsWith("#")) - { - if (path.StartsWith("//")) - { - path = path.Substring(2); - } - if (path.Contains("#")) - { - path = path.Substring(0, path.IndexOf("#")); - } - to = path + to; - } - else - { - to = path.Substring(0, path.LastIndexOf('/')+1) + to; - } - browser.Navigate(new Uri(to, UriKind.RelativeOrAbsolute)); - } - - Storyboard.SetTarget(imgAnimation, img2); - Storyboard.SetTargetProperty(imgAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform." + animationAxis + ")")); - - - browser.RenderTransform = new TranslateTransform(); - DoubleAnimation webviewAnimation = new DoubleAnimation(); - webviewAnimation.Duration = TimeSpan.FromMilliseconds(transitionOptions.duration); - webviewAnimation.From = webviewAnimationFrom / webviewSlowdownFactor; - webviewAnimation.To = 0; - Storyboard.SetTarget(webviewAnimation, browser); - Storyboard.SetTargetProperty(webviewAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform." + animationAxis + ")")); - - - Storyboard storyboard = new Storyboard(); - storyboard.Completed += slideAnimationCompleted; - storyboard.Children.Add(imgAnimation); - storyboard.Children.Add(webviewAnimation); - - this.Perform(delegate() - { - cView.LayoutRoot.Children.Remove(img); - storyboard.Begin(); - }, transitionOptions.winphonedelay); - }); - } - - - public void flip(string options) - { - try - { - String jsonOptions = JsonHelper.Deserialize(options)[0]; - transitionOptions = JsonHelper.Deserialize(jsonOptions); - } - catch (Exception) - { - DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); - return; - } - - Deployment.Current.Dispatcher.BeginInvoke(() => - { - // grab a screenshot - WriteableBitmap bmp = new WriteableBitmap(browser, null); - - img2 = new Image(); - img2.Source = bmp; - - int direction = 1; - DependencyProperty property = PlaneProjection.RotationYProperty; - - if (transitionOptions.direction == "right") - { - direction = -1; - } - else if (transitionOptions.direction == "up") - { - property = PlaneProjection.RotationXProperty; - direction = -1; - } - else if (transitionOptions.direction == "down") - { - property = PlaneProjection.RotationXProperty; - } - - // Insert the screenshot above the webview (index 1) - cView.LayoutRoot.Children.Insert(1, img2); - - // now load the new content - if (transitionOptions.href != null && transitionOptions.href != "" && transitionOptions.href != "null") - { - String to = transitionOptions.href; - Uri currenturi = browser.Source; - string path = currenturi.OriginalString; - if (to.StartsWith("#")) - { - if (path.StartsWith("//")) - { - path = path.Substring(2); - } - if (path.Contains("#")) - { - path = path.Substring(0, path.IndexOf("#")); - } - to = path + to; - } - else - { - to = path.Substring(0, path.LastIndexOf('/')+1) + to; - } - browser.Navigate(new Uri(to, UriKind.RelativeOrAbsolute)); - } - - TimeSpan duration = TimeSpan.FromMilliseconds(transitionOptions.duration); - Storyboard sb = new Storyboard(); - sb.Completed += flipAnimationCompleted; - - // animation for the screenshot - DoubleAnimation imgAnimation = new DoubleAnimation() - { - From = 0, - To = direction * 180, - Duration = new Duration(duration) - }; - Storyboard.SetTargetProperty(imgAnimation, new PropertyPath(property)); - img2.Projection = new PlaneProjection(); - Storyboard.SetTarget(imgAnimation, img2.Projection); - sb.Children.Add(imgAnimation); - - // animation for the webview - DoubleAnimation webviewAnimation = new DoubleAnimation() - { - From = direction * -180, - To = 0, - Duration = new Duration(duration) - }; - Storyboard.SetTargetProperty(webviewAnimation, new PropertyPath(property)); - browser.Projection = new PlaneProjection(); - Storyboard.SetTarget(webviewAnimation, browser.Projection); - sb.Children.Add(webviewAnimation); - - // perform the transition after the specified delay - this.Perform(delegate() - { - // remove the image halfway down the transition so we don't see the back of the image instead of the webview - this.Perform(delegate() - { - Deployment.Current.Dispatcher.BeginInvoke(() => - { - CordovaView cView2 = getCordovaView(); - cView2.LayoutRoot.Children.Remove(img2); - }); - }, transitionOptions.duration / 2); - - sb.Begin(); - }, transitionOptions.winphonedelay); - }); - } - - // clean up resources - private void slideAnimationCompleted(object sender, EventArgs e) - { - (sender as Storyboard).Completed -= slideAnimationCompleted; - Deployment.Current.Dispatcher.BeginInvoke(() => - { - CordovaView cView = getCordovaView(); - cView.LayoutRoot.Children.Remove(img2); - }); - DispatchCommandResult(new PluginResult(PluginResult.Status.OK)); - } - - private void flipAnimationCompleted(object sender, EventArgs e) - { - (sender as Storyboard).Completed -= flipAnimationCompleted; - DispatchCommandResult(new PluginResult(PluginResult.Status.OK)); - } - - void Browser_Navigated(object sender, NavigationEventArgs e) - { - } - - void Browser_Navigating(object sender, NavigationEventArgs e) - { - } - - private CordovaView getCordovaView() - { - PhoneApplicationFrame frame = (PhoneApplicationFrame)Application.Current.RootVisual; - PhoneApplicationPage page = (PhoneApplicationPage)frame.Content; - return (CordovaView)page.FindName("CordovaView"); - } - - private void Perform(Action myMethod, int delayInMilliseconds) - { - BackgroundWorker worker = new BackgroundWorker(); - worker.DoWork += (s, e) => Thread.Sleep(delayInMilliseconds); - worker.RunWorkerCompleted += (s, e) => myMethod.Invoke(); - worker.RunWorkerAsync(); - } - } -} \ No newline at end of file From fba6b9e09cd0bd35b86a3aa6184c029e4b3aeaf7 Mon Sep 17 00:00:00 2001 From: Tommy Lacroix Date: Tue, 5 May 2020 19:08:03 -0400 Subject: [PATCH 3/7] Fixed typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d65c7d7..ab55cd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "version": "0.6.6", - "name": "cordova-plugin-nativepagetranslations", + "name": "cordova-plugin-nativepagetransitions", "cordova_name": "Native Page Transitions", "description": "Slide out the current page to reveal the next one. By a native transitions.", "license": "MIT", From 61619af08e74c6c87240d9b4204cd6e9bbbc3f56 Mon Sep 17 00:00:00 2001 From: tlacroix Date: Tue, 5 May 2020 19:15:42 -0400 Subject: [PATCH 4/7] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc45bc4..1410667 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Native Page Transitions Cordova / PhoneGap Plugin -Original (and now unmaintained) version by by [Telerik](https://github.com/Telerik-Verified-Plugins/NativePageTransitions) +Original (and now unmaintained) version by [Telerik](https://github.com/Telerik-Verified-Plugins/NativePageTransitions) ## Fixes since Telerik version From d5c3bc39ce5f75edc35d11c1bbe8d843bee61a17 Mon Sep 17 00:00:00 2001 From: tlacroix Date: Tue, 5 May 2020 19:20:04 -0400 Subject: [PATCH 5/7] Updated README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1410667..ffc8341 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # Native Page Transitions Cordova / PhoneGap Plugin -Original (and now unmaintained) version by [Telerik](https://github.com/Telerik-Verified-Plugins/NativePageTransitions) -## Fixes since Telerik version +## Aknowledgments + +This is a fork of now unmaintained plugin by [Telerik](https://github.com/Telerik-Verified-Plugins/NativePageTransitions) + +## Fixes since Telerik last version (0.6.5) * ITMS-90809: UIWebView API Deprecation From 89f7b69833ba463ee3fa9333b429c3d0ed0df085 Mon Sep 17 00:00:00 2001 From: Tommy Lacroix Date: Tue, 5 May 2020 19:21:29 -0400 Subject: [PATCH 6/7] Added CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..386f826 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# Release notes + +## 0.6.6 + +* Removed support for Windows Phone 8 +* Fixed iOS version for Apple's ITMS-90809: UIWebView API Deprecation From 266aadff2e87b2ec14464ac48ce13d037214b1be Mon Sep 17 00:00:00 2001 From: CircleCI Date: Tue, 19 May 2020 12:48:58 -0400 Subject: [PATCH 7/7] Remove unnecessary WKWebView/UIWebview logic --- src/ios/NativePageTransitions.m | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/ios/NativePageTransitions.m b/src/ios/NativePageTransitions.m index 231f7d2..ebcb044 100644 --- a/src/ios/NativePageTransitions.m +++ b/src/ios/NativePageTransitions.m @@ -718,10 +718,6 @@ - (UIImage*) grabScreenshot { } - (BOOL) loadHrefIfPassed:(NSString*) href { - WKWebView *uiwebview = nil; - if ([self.webView isKindOfClass:[WKWebView class]]) { - uiwebview = ((WKWebView*)self.webView); - } if (href != nil && ![href isEqual:[NSNull null]]) { if (![href hasPrefix:@"#"]) { // strip any params when looking for the file on the filesystem @@ -735,11 +731,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { } NSURL *url; NSURL *origUrl; - if (self.wkWebView != nil) { - origUrl = self.wkWebView.URL; - } else { - origUrl = uiwebview.URL; - } + origUrl = self.wkWebView.URL; if([origUrl.scheme isEqualToString:@"file"]) { NSString *currentUrl = origUrl.absoluteString; NSRange lastSlash = [currentUrl rangeOfString:@"/" options:NSBackwardsSearch]; @@ -761,12 +753,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; - // Utilize WKWebView for request if it exists - if (self.wkWebView != nil) { - [self.wkWebView loadRequest: urlRequest]; - } else { - [uiwebview loadRequest: urlRequest]; - } + [self.wkWebView loadRequest: urlRequest]; } else if (![href hasPrefix:@"#"]) { CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"href must be null, a .html file or a #navigationhash"]; [self.commandDelegate sendPluginResult:pluginResult callbackId:_command.callbackId]; @@ -774,11 +761,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { } else { // it's a hash, so load the url without any possible current hash NSString *url = nil; - if (self.wkWebView != nil) { - url = self.wkWebView.URL.absoluteString; - } else { - url = uiwebview.URL.absoluteString; - } + url = self.wkWebView.URL.absoluteString; // remove the # if it's still there if ([url rangeOfString:@"#"].location != NSNotFound) { @@ -790,11 +773,7 @@ - (BOOL) loadHrefIfPassed:(NSString*) href { // and load it NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; - if (self.wkWebView != nil) { - [self.wkWebView loadRequest: urlRequest]; - } else { - [uiwebview loadRequest: urlRequest]; - } + [self.wkWebView loadRequest: urlRequest]; } } return YES;