mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-05-15 15:26:22 +08:00
CB-11018 Fix statusbar with inappbrowser causing incorrect orientation on iOS8
This commit is contained in:
parent
244eb717fd
commit
16ff9b449f
@ -446,8 +446,17 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
|||||||
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
|
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
|
||||||
self.viewController.view.frame = bounds;
|
self.viewController.view.frame = bounds;
|
||||||
} else if (self.viewController.presentedViewController != nil) {
|
} 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);
|
bounds = CGRectMake(0, 0, bounds.size.height, bounds.size.width);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
self.webView.frame = bounds;
|
self.webView.frame = bounds;
|
||||||
|
|
||||||
if (!self.statusBarOverlaysWebView) {
|
if (!self.statusBarOverlaysWebView) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user