From 0944be5c9f96ca0e39e0079f46ffc37894a586cd Mon Sep 17 00:00:00 2001 From: Ryan Willoughby Date: Tue, 25 Feb 2014 17:43:43 -0800 Subject: [PATCH] Issue #21 fix + don't resize the webview when hiding the statusbar if its overlaid --- src/ios/CDVStatusBar.m | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index 21ba9b8..47bd0e3 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -319,16 +319,20 @@ - (void) hide:(CDVInvokedUrlCommand*)command [_statusBarBackgroundView removeFromSuperview]; } - CGRect frame = self.webView.frame; - frame.origin.y = 0; + if (!_statusBarOverlaysWebView) { - if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { - frame.size.height += statusBarFrame.size.width; - } else { - frame.size.height += statusBarFrame.size.height; + CGRect frame = self.webView.frame; + frame.origin.y = 0; + + if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { + frame.size.height += statusBarFrame.size.width; + } else { + frame.size.height += statusBarFrame.size.height; + } + + self.webView.frame = frame; } - self.webView.frame = frame; _statusBarBackgroundView.hidden = YES; } }