From 4e6cf5cc2e4739fac53111cee62f0217491b1539 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Tue, 15 Oct 2013 10:29:54 -0700 Subject: [PATCH] CB-4958 - iOS - Camera plugin should not show the status bar --- src/ios/CDVCamera.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index 19f8148..42c5237 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -736,4 +736,21 @@ static NSSet* org_apache_cordova_validArrowDirections; @synthesize webView; @synthesize popoverSupported; +- (BOOL)prefersStatusBarHidden { + return YES; +} + +- (UIViewController*)childViewControllerForStatusBarHidden { + return nil; +} + +- (void)viewWillAppear:(BOOL)animated { + SEL sel = NSSelectorFromString(@"setNeedsStatusBarAppearanceUpdate"); + if ([self respondsToSelector:sel]) { + [self performSelector:sel withObject:nil afterDelay:0]; + } + + [super viewWillAppear:animated]; +} + @end