CB-11018 Fix statusbar with inappbrowser causing incorrect orientation on iOS8

This commit is contained in:
daserge 2016-04-05 17:39:36 +03:00
parent 244eb717fd
commit 16ff9b449f

View File

@ -446,8 +446,17 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
self.viewController.view.frame = bounds;
} else if (self.viewController.presentedViewController != nil) {
// 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;
if (!self.statusBarOverlaysWebView) {