I've tried setting the Info.plist 'View controller-based status bar appearance' to NO, I've tried calling
[[UIApplication sharedApplication] setStatusBarHidden:YES];
I've tried
-(BOOL)prefersStatusBarHidden{
return YES;
}
I've tried launching the picker with
[self presentViewController:picker animated:NO completion:^{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
And still, there is a status bar overlapping the camera controls. It's only there in iOS 7 though.
The status bar doesn't show up any where else in the app. I feel like I'm missing an important piece of the puzzle here, and no amount of reading about the View Controller or UIImagePickerController has helped me find said puzzle piece.
I'm hoping some one else has a little insight into this problem. Thank you.
EDIT: My desired effect is that the Status Bar shows up every in the app, except on the camera picker and a few other "outside" (Email related) view controllers we use.
If you want to keep ViewController-Based Status Bar Appearance
, subclass UIImagePickerController and override prefersStatusBarHidden
and childViewControllerForStatusBarHidden
.
@interface NoStatusBarImagePickerController : UIImagePickerController
@end
@implementation NoStatusBarImagePickerController
- (BOOL)prefersStatusBarHidden {
return YES;
}
- (UIViewController *)childViewControllerForStatusBarHidden {
return nil;
}
@end
Try this :
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
in your appDelegate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With