cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [10/11] cordova-plugin-statusbar git commit: CB-11018 Fix statusbar with inappbrowser causing incorrect orientation on iOS8
Date Fri, 15 Apr 2016 20:49:56 GMT
CB-11018 Fix statusbar with inappbrowser causing incorrect orientation on iOS8


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/16ff9b44
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/16ff9b44
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/16ff9b44

Branch: refs/heads/2.1.x
Commit: 16ff9b449f83a71b6bf80ca59b44bed84f2af810
Parents: 244eb71
Author: daserge <v-seshak@microsoft.com>
Authored: Tue Apr 5 17:39:36 2016 +0300
Committer: daserge <v-seshak@microsoft.com>
Committed: Tue Apr 5 17:39:36 2016 +0300

----------------------------------------------------------------------
 src/ios/CDVStatusBar.m | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/16ff9b44/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m
index 23c983a..a26a15f 100644
--- a/src/ios/CDVStatusBar.m
+++ b/src/ios/CDVStatusBar.m
@@ -446,7 +446,16 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
         if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
{
             self.viewController.view.frame = bounds;
         } else if (self.viewController.presentedViewController != nil) {
-            bounds = CGRectMake(0, 0, bounds.size.height, bounds.size.width);
+            // https://issues.apache.org/jira/browse/CB-11018
+            BOOL isIOS8 = (IsAtLeastiOSVersion(@"8.0"));
+            BOOL isIOS9 = (IsAtLeastiOSVersion(@"9.0"));
+            if (isIOS8 && !isIOS9) {
+                // iOS 8
+                bounds = CGRectMake(0, 0, bounds.size.width, bounds.size.height);
+            } else {
+                // iOS7, iOS9+
+                bounds = CGRectMake(0, 0, bounds.size.height, bounds.size.width);
+            }
         }
         self.webView.frame = bounds;
         


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message