Change Status Bar to Black?

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

  1. macrumors regular

    Joined:
    Jun 25, 2005
    Location:
    Australia
    #1
    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

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Look for the setStatusBarStyle:animated: method of UIApplication
     
  3. macrumors member

    Joined:
    Jul 28, 2008
    #3
    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

    Joined:
    Jul 30, 2008
    #4
    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

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

    Joined:
    Feb 4, 2009
    #6
    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