I have made an app that implements the iPhone\'s camera. When the user finishes picking their image, the status bar reappears! How would I make sure that the status bar sta
With iOS 7 and later, you can use the following code to hide and unhide the status bar,
@interface ViewController()
@property (nonatomic, getter=isStatusBarHidden) BOOL statusBarHidden;
@end
@implementation ViewController
... other codes
- (BOOL)prefersStatusBarHidden {
return self.isStatusBarHidden;
}
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationFade;
}
- (void)hideStatusBar {
self.statusBarHidden = YES;
[self setNeedsStatusBarAppearanceUpdate];
}
- (void)showStatusBar {
self.statusBarHidden = NO;
[self setNeedsStatusBarAppearanceUpdate];
}
@end