-
-
Save Marlunes/6006700 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; | |
} |
Nice, works perfect! thanks.
Any idea of how you would do this programatically within the app? If I want to hide and show the status bar on certain events?
*info.plist add key and value.
key is "View controller-based status bar appearance".
value is 'NO"
and *info.plist saved.
run.
@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.
For iOS 7 beta, only add this method to my root view controller, and it's worked