diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index 37c6dcd..ee1d6cb 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -448,26 +448,13 @@ static const void *kStatusBarStyle = &kStatusBarStyle; if (isIOS7) { CGRect bounds = [self.viewController.view.window bounds]; + if (CGRectEqualToRect(bounds, CGRectZero)) { + bounds = [[UIScreen mainScreen] bounds]; + } bounds = [self invertFrameIfNeeded:bounds]; - 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+ - 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.viewController.view.frame = bounds; + self.webView.frame = bounds; CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;