mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-03-15 03:21:06 +08:00
CB-11018 Fix statusbar with inappbrowser causing incorrect orientation on iOS8
This commit is contained in:
parent
244eb717fd
commit
16ff9b449f
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user