From 6552bddfd1083dff8a13c165ed8c68476b332ee6 Mon Sep 17 00:00:00 2001 From: Tiancheng Zhu Date: Thu, 10 Apr 2014 16:25:47 -0700 Subject: [PATCH] ios: Fix hide to adjust webview's frame only when status bar is not overlaying webview --- src/ios/CDVStatusBar.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index e954a54..e773397 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -327,11 +327,12 @@ static const void *kStatusBarStyle = &kStatusBarStyle; 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; + if (!self.statusBarOverlaysWebView) { + if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { + frame.size.height += statusBarFrame.size.width; + } else { + frame.size.height += statusBarFrame.size.height; + } } self.webView.frame = frame;