cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject git commit: CB-7549 - [StatusBar][iOS 8] Landscape issue
Date Tue, 16 Sep 2014 23:47:15 GMT
Repository: cordova-plugin-statusbar
Updated Branches:
  refs/heads/master 61024e50b -> 921daccd2


CB-7549 - [StatusBar][iOS 8] Landscape issue

When starting an app in landscape mode in ios 8 and then calling StatusBar.overlaysWebView(false),
the screen would be pushed down all the way.  Changing the orientation did not fix the issue,
leaving the page pushed down the width of the device.

We found that excluding the changes above in ios 8 fixed the issue, although it's possible
that this is hiding a landscape orientation bug in ios 8 that may get fixed later.

Signed-off-by: Shazron Abdullah <shazron@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/921daccd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/921daccd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/921daccd

Branch: refs/heads/master
Commit: 921daccd2cc7be5294488adb64b8c4c36363b63c
Parents: 61024e5
Author: twomz <williamsjakeb@gmail.com>
Authored: Mon Sep 15 16:19:20 2014 -0500
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Tue Sep 16 16:40:15 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/921daccd/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m
index 8b6666e..e39424d 100644
--- a/src/ios/CDVStatusBar.m
+++ b/src/ios/CDVStatusBar.m
@@ -168,7 +168,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
 - (void) initializeStatusBarBackgroundView
 {
     CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
-    if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
+    if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation) &&
!IsAtLeastiOSVersion(@"8.0")) {
         // swap width and height. set origin to zero
         statusBarFrame = CGRectMake(0, 0, statusBarFrame.size.height, statusBarFrame.size.width);
     }
@@ -205,7 +205,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
 
         CGRect frame = self.webView.frame;
 
-        if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
+        if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation) &&
!IsAtLeastiOSVersion(@"8.0")) {
             frame.origin.y = statusBarFrame.size.width;
             frame.size.height -= statusBarFrame.size.width;
         } else {


Mime
View raw message