You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2016/04/11 10:52:53 UTC
cordova-plugin-statusbar git commit: CB-11018 Fix statusbar with
inappbrowser causing incorrect orientation on iOS8
Repository: cordova-plugin-statusbar
Updated Branches:
refs/heads/master 244eb717f -> 16ff9b449
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/master
Commit: 16ff9b449f83a71b6bf80ca59b44bed84f2af810
Parents: 244eb71
Author: daserge <v-...@microsoft.com>
Authored: Tue Apr 5 17:39:36 2016 +0300
Committer: daserge <v-...@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