From b7dc5ef7cbc474b0f26f3c66b8a6abfbf953efd4 Mon Sep 17 00:00:00 2001 From: Julio Cesar Sanchez Hernandez Date: Sun, 30 Oct 2016 15:37:58 +0100 Subject: [PATCH] CB-10158 (ios) fix StatusBar issue when recovering from fullscreen video This closes #70 --- src/ios/CDVStatusBar.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index 55f7ed6..f563e49 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -473,16 +473,16 @@ static const void *kStatusBarStyle = &kStatusBarStyle; CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; statusBarFrame = [self invertFrameIfNeeded:statusBarFrame]; CGRect frame = self.webView.frame; + CGFloat height = statusBarFrame.size.height; if (!self.statusBarOverlaysWebView) { - frame.origin.y = statusBarFrame.size.height; - frame.size.height -= statusBarFrame.size.height; + // CB-10158 If a full screen video is playing the status bar height will be 0, set it to 20 + frame.origin.y = height > 0 ? height: 20; } else { - // even if overlay is used, we want to handle in-call/recording/hotspot larger status bar - CGFloat height = statusBarFrame.size.height; + // 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; } + frame.size.height -= frame.origin.y; self.webView.frame = frame; } else { CGRect bounds = [[UIScreen mainScreen] applicationFrame];