View Full Version : Black status bar (as seen in home screen) possible?
I'm a Mac
Sep 27, 2008, 12:02 AM
I know how to hide the menu bar, but when the menu bar isn't hidden, it's usually a conspicuous gray. How do you make the menu bar black, like it is while viewing the home screen, or blend in to another image, as it does when viewing photos in the Photo application?
Sep 27, 2008, 03:35 AM
- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle animated:(BOOL)animated
method of UIApplication.
I'm a Mac
Sep 27, 2008, 04:05 PM
I added this method to the applicationDidFinishLaunching [[UIApplication sharedApplication] setStatusBarStyle:(UIStatusBarStyle) animated:YES]];
and I get an error message that "animated is undeclared and a warning that UI application might not respond to '-setStatusBarStyle;;'
Sep 28, 2008, 12:11 AM
Both of those code-tidbits will show up the original window with the Gray status bar, then it will flicker to Black.
The only way (and the best way) is to modify the Info.plist in Xcode of your App.
UIStatusBarStyleOpaqueBlack or UIStatusBarStyleBlackOpaque or UIStatusBarStyleBlackTransparent
Then when you launch the app, it has the Black bar from start to finish. No flicker. :D
Sep 28, 2008, 02:45 AM
In the Info.plist file set the status bar to hidden
In app Set the style to black with:
[application setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO];
Now show the status bar animate to the style to avoid flicker:
[application setStatusBarHidden:NO animated:YES];
Hope that helps (and works;))
I'm a Mac
Sep 28, 2008, 11:16 AM
I don't quite know the correct way to edit the info.plist file. Mine doesn't contain code, it just is a table that says Key and Value. It has information like the bundle identifier.
Sep 28, 2008, 02:48 PM
open Info.plist in TextEdit and add the two lines below and save again (or <false/> if that's what you want in an app)
OR in Xcode / Property List Editor editor
ctrl click (or right click) a row, select Add Row from pop up menu, name it UIStatusBarHidden.
Then ctrl (right) click on the row, select Value Type - boolean. Then check or uncheck it as required.