cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [2/2] git commit: 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
Date Thu, 06 Mar 2014 23:40:02 GMT
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


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/6d954c0b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/6d954c0b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/6d954c0b

Branch: refs/heads/master
Commit: 6d954c0b9431eff62323dbf26ed9e957eb33afc7
Parents: 2e3af74
Author: Ryan Willoughby <ryan.willoughby@adobe.com>
Authored: Tue Feb 25 17:54:37 2014 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Mar 6 15:38:49 2014 -0800

----------------------------------------------------------------------
 statusbar/src/ios/CDVStatusBar.m | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/6d954c0b/statusbar/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/statusbar/src/ios/CDVStatusBar.m b/statusbar/src/ios/CDVStatusBar.m
index 8916e0d..af93134 100644
--- a/statusbar/src/ios/CDVStatusBar.m
+++ b/statusbar/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;
     }
 }


Mime
View raw message