Skip to content

Instantly share code, notes, and snippets.

@miho
Forked from Marlunes/hide_status_bar
Created August 18, 2013 07:23
Show Gist options
  • Save miho/6260359 to your computer and use it in GitHub Desktop.
Save miho/6260359 to your computer and use it in GitHub Desktop.
//viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
// Add this Method
- (BOOL)prefersStatusBarHidden
{
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment