Created
July 16, 2013 07:54
-
-
Save Marlunes/6006700 to your computer and use it in GitHub Desktop.
FORCE HIDE STATUS BAR FOR IOS 7 AND 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; | |
} |
@moohyu cool. thank you!
@moohyu Thanks it works fine for me.
@moohyu - do I need that in addition to the code above? I still have a white bar at the bottom of my app after trying this... thanks!
Thanks - helped me out a bunch!
This didn't work for me
didn't work!
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
*info.plist add key and value.
key is "View controller-based status bar appearance".
value is 'NO"
and *info.plist saved.
run.