From a4d6320c373967fb964a26647cde91087f453a76 Mon Sep 17 00:00:00 2001 From: Ryan Willoughby Date: Tue, 25 Feb 2014 17:54:37 -0800 Subject: [PATCH] CB-6187 - If you Show and Hide the StatusBar - it will expand the screen-size by ~20 pixels + don't resize the webview on hide if statusbar overlays it --- 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 8916e0d..af93134 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -319,16 +319,20 @@ static const void *kStatusBarStyle = &kStatusBarStyle; [_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; } }