From b1fcfb4ea660985b8c633bceff97a84c4414b8f7 Mon Sep 17 00:00:00 2001 From: mikko-n Date: Thu, 22 Mar 2018 15:17:21 +0200 Subject: [PATCH 1/3] Bugfixes -Fixed resizing issue on device orientation change (tested with ios10) -fixed zooming issue, no zooming was possible (tested with ios10) --- src/ios/DocumentWebviewViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ios/DocumentWebviewViewController.m b/src/ios/DocumentWebviewViewController.m index ad84e6c..c79b1a8 100644 --- a/src/ios/DocumentWebviewViewController.m +++ b/src/ios/DocumentWebviewViewController.m @@ -57,6 +57,11 @@ - (void)viewDidLoad { [[self.webView scrollView] setContentOffset:CGPointMake(0,500) animated:YES]; [self.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.scrollTo(0.0, 50.0)"]]; + // fix resizing issue on orientation change - https://stackoverflow.com/questions/21179364/ios-uiwebview-orientation-issue + self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; + // fix zooming issue with pdf files - https://stackoverflow.com/questions/7134576/enable-zooming-pinch-on-uiwebview + self.webView.scalesPageToFit=YES; + } -(void) loadDocumentWithUrl:(NSString *) urlString { From 68e63b8473fe1d5b0e7aee377ece214ae7880dee Mon Sep 17 00:00:00 2001 From: mikko-n Date: Thu, 22 Mar 2018 15:20:28 +0200 Subject: [PATCH 2/3] Better fix description --- src/ios/DocumentWebviewViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/DocumentWebviewViewController.m b/src/ios/DocumentWebviewViewController.m index c79b1a8..b0398cf 100644 --- a/src/ios/DocumentWebviewViewController.m +++ b/src/ios/DocumentWebviewViewController.m @@ -59,7 +59,7 @@ - (void)viewDidLoad { // fix resizing issue on orientation change - https://stackoverflow.com/questions/21179364/ios-uiwebview-orientation-issue self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - // fix zooming issue with pdf files - https://stackoverflow.com/questions/7134576/enable-zooming-pinch-on-uiwebview + // fix zooming issue - https://stackoverflow.com/questions/7134576/enable-zooming-pinch-on-uiwebview self.webView.scalesPageToFit=YES; } From ee197f3bbc64b82bdd0941381786afcad612adec Mon Sep 17 00:00:00 2001 From: mikko-n Date: Thu, 22 Mar 2018 15:44:30 +0200 Subject: [PATCH 3/3] set viewport scaling preference to true on ios --- plugin.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 6e7a1a7..28af082 100644 --- a/plugin.xml +++ b/plugin.xml @@ -16,6 +16,7 @@ + @@ -40,4 +41,4 @@ - \ No newline at end of file +