Change Status Bar to Black?

Discussion in 'iOS Programming' started by Mac Me Up, Aug 22, 2008.

  1. macrumors regular

    Jun 25, 2005
    I've been digging through the apple documentation, but I can't seem to find how some apps change the colour of the status bar (with your signal strength, etc in it) to black? I'm guessing it's just a one line call somewhere?
  2. Moderator emeritus


    Jul 24, 2002
    Look for the setStatusBarStyle:animated: method of UIApplication
  3. macrumors member

    Jul 28, 2008
    You may also want to set UIStatusBarStyle = UIStatusBarStyleOpaqueBlack in your Info.plist, so that the Default.png shows a black status bar instead of the gray one before your application is loaded.
  4. macrumors regular

    Jul 30, 2008
    This is a very similar question to the OP, but is there any way to change the navbar-style to black through the info.plist as well? Right now I am doing it through code, and while this works it creates a bit of a delay, where first the navbar is black and then after about a second, once the program loads properly turns black.

    Thank you :)
  5. macrumors member

    Jul 28, 2008
    How do you create the nav bar ? With a xib ? If so, then you can change it in IB I think.
  6. macrumors newbie

    Feb 4, 2009
    Just to help anyone else who stumbles across this...

    The correct item to add to the Info.plist is:

    UIStatusBarStyle = UIStatusBarStyleBlackOpaque

    (There's no code completion when editing Info.plist, so if it's not working check that you've got the spelling *exactly* right.)

Share This Page