Skip to content

Instantly share code, notes, and snippets.

@CocoaRush
CocoaRush / hideStatusBar.m
Last active December 21, 2015 20:29 — forked from Marlunes/hide_status_bar
hide status bar on iOS 7, add this snippet on the root view controller.
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
if ([self respondsToSelector:SELE(setNeedsStatusBarAppearanceUpdate)]) { //iOS 7
[self setNeedsStatusBarAppearanceUpdate];
} else {
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
}