Repository: cordova-plugin-statusbar Updated Branches: refs/heads/master f2c49454d -> 1d1ac928a
Handle extended status bar on iOS This closes #55 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/554e65e6 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/554e65e6 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/554e65e6 Branch: refs/heads/master Commit: 554e65e60f7f801f23553929386e8bdcf3835a15 Parents: f2c4945 Author: Gosha Arinich <m...@goshakkk.name> Authored: Thu Apr 7 16:44:32 2016 +0300 Committer: Julio César <jcesarmob...@gmail.com> Committed: Thu Sep 1 20:01:42 2016 +0200 ---------------------------------------------------------------------- src/ios/CDVStatusBar.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/554e65e6/src/ios/CDVStatusBar.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index ba4c04e..3f87a13 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -442,7 +442,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; if (isIOS7) { CGRect bounds = [[UIScreen mainScreen] bounds]; bounds = [self invertFrameIfNeeded:bounds]; - + if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) { self.viewController.view.frame = bounds; } else if (self.viewController.presentedViewController != nil) { @@ -462,7 +462,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; } } self.webView.frame = bounds; - + if (!self.statusBarOverlaysWebView) { CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; statusBarFrame = [self invertFrameIfNeeded:statusBarFrame]; @@ -470,6 +470,15 @@ static const void *kStatusBarStyle = &kStatusBarStyle; frame.origin.y = statusBarFrame.size.height; frame.size.height -= statusBarFrame.size.height; self.webView.frame = frame; + } else { + // even if overlay is used, we want to handle in-call/recording/hotspot larger status bar + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + statusBarFrame = [self invertFrameIfNeeded:statusBarFrame]; + CGRect frame = self.webView.frame; + CGFloat height = statusBarFrame.size.height; + frame.origin.y = height >= 20 ? height - 20 : 0; + frame.size.height -= frame.origin.y; + self.webView.frame = frame; } } else { CGRect bounds = [[UIScreen mainScreen] applicationFrame]; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org