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 + diff --git a/src/ios/DocumentWebviewViewController.m b/src/ios/DocumentWebviewViewController.m index ad84e6c..b0398cf 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 - https://stackoverflow.com/questions/7134576/enable-zooming-pinch-on-uiwebview + self.webView.scalesPageToFit=YES; + } -(void) loadDocumentWithUrl:(NSString *) urlString {