From c45331b95555c5c77b4ed4ca690236a9b077ec4b Mon Sep 17 00:00:00 2001 From: Julio Cesar Sanchez Hernandez Date: Fri, 20 Oct 2017 16:40:46 +0200 Subject: [PATCH] CB-13476 (iOS): handle double size statusbar on SDK 10 for iOS 11 This closes #90 --- src/ios/CDVStatusBar.m | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index 68a6b1c..cf86559 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -217,7 +217,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; rect.size.height = temp; rect.origin = CGPointZero; } - + return rect; } @@ -227,7 +227,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; if (!IsAtLeastiOSVersion(@"7.0") || statusBarOverlaysWebView == _statusBarOverlaysWebView) { return; } - + _statusBarOverlaysWebView = statusBarOverlaysWebView; [self resizeWebView]; @@ -387,7 +387,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; if (!app.isStatusBarHidden) { - + [self hideStatusBar]; if (IsAtLeastiOSVersion(@"7.0")) { @@ -475,6 +475,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; if (!self.statusBarOverlaysWebView) { frame.origin.y = height; } else { + frame.origin.y = height >= 20 ? height - 20 : 0; if (isIOS11) { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 if (@available(iOS 11.0, *)) { @@ -487,9 +488,6 @@ static const void *kStatusBarStyle = &kStatusBarStyle; } } #endif - } else { - // Even if overlay is used, we want to handle in-call/recording/hotspot larger status bar - frame.origin.y = height >= 20 ? height - 20 : 0; } } frame.size.height -= frame.origin.y;