mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-19 01:12:49 +08:00
CB-12141 (ios) fix white app screen after camera overlay shown on iPad
This closes #73
This commit is contained in:
parent
834b8cb5fb
commit
a120ba1a1f
@ -448,26 +448,13 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
|||||||
|
|
||||||
if (isIOS7) {
|
if (isIOS7) {
|
||||||
CGRect bounds = [self.viewController.view.window bounds];
|
CGRect bounds = [self.viewController.view.window bounds];
|
||||||
|
if (CGRectEqualToRect(bounds, CGRectZero)) {
|
||||||
|
bounds = [[UIScreen mainScreen] bounds];
|
||||||
|
}
|
||||||
bounds = [self invertFrameIfNeeded:bounds];
|
bounds = [self invertFrameIfNeeded:bounds];
|
||||||
|
|
||||||
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
|
self.viewController.view.frame = bounds;
|
||||||
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+
|
|
||||||
if ([self.viewController.presentedViewController.presentationController isKindOfClass:[UIPopoverPresentationController class]] || UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) {
|
|
||||||
bounds = CGRectMake(0, 0, bounds.size.width, bounds.size.height);
|
|
||||||
} else {
|
|
||||||
bounds = CGRectMake(0, 0, bounds.size.height, bounds.size.width);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
self.webView.frame = bounds;
|
self.webView.frame = bounds;
|
||||||
|
|
||||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||||
|
Loading…
Reference in New Issue
Block a user