You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/10/08 01:51:41 UTC

git commit: Fixed statusbar background view not auto-resizing on landscape.

Updated Branches:
  refs/heads/plugins 4a319778a -> 48e6586e2


Fixed statusbar background view not auto-resizing on landscape.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/48e6586e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/48e6586e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/48e6586e

Branch: refs/heads/plugins
Commit: 48e6586e260737ac5cdf0c9b2d681474f029286b
Parents: 4a31977
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Oct 7 16:51:36 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Oct 7 16:51:36 2013 -0700

----------------------------------------------------------------------
 statusbar/src/ios/CDVStatusBar.m | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/48e6586e/statusbar/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/statusbar/src/ios/CDVStatusBar.m b/statusbar/src/ios/CDVStatusBar.m
index 51efc3d..e49bcd8 100644
--- a/statusbar/src/ios/CDVStatusBar.m
+++ b/statusbar/src/ios/CDVStatusBar.m
@@ -48,6 +48,8 @@
     
     _statusBarBackgroundView = [[UIView alloc] initWithFrame:frame];
     _statusBarBackgroundView.backgroundColor = [UIColor blackColor];
+    _statusBarBackgroundView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin);
+    
     [self styleLightContent:nil]; // match default backgroundColor of #000000
     
     NSString* setting;
@@ -72,11 +74,7 @@
     
     if (statusBarOverlaysWebView) {
         
-        CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
         CGRect bounds = self.viewController.view.bounds;
-        bounds.origin.y = 0;
-        bounds.size.height += statusBarFrame.size.height;
-        
         self.webView.frame = bounds;
         
         [_statusBarBackgroundView removeFromSuperview];