Skip to content

Instantly share code, notes, and snippets.

@Marlunes
Created July 16, 2013 07:54
Show Gist options
  • Save Marlunes/6006700 to your computer and use it in GitHub Desktop.
Save Marlunes/6006700 to your computer and use it in GitHub Desktop.
FORCE HIDE STATUS BAR FOR IOS 7 AND 6
//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;
}
@KiemDuong
Copy link

didn't work!

@cemerson
Copy link

cemerson commented Oct 2, 2014

Yeah not working for me yet either - there seems to be more variable(s) at play here or something. Ugh - I just want to hide the thing!

Also - anyone have any luck getting something like this applied to the InAppBrowser webview? Seems like that status bar is obeying a different set of rules. At first stab these snippets don't seem to work on the CDVInAppBrowser.m file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment