Status bar won't change!

Discussion in 'iOS Programming' started by liptonlover, Oct 12, 2008.

  1. liptonlover macrumors 6502a

    Mar 13, 2008
    In IB, I'm changing the status bar from grey to black. It shows the change in IB. But when I simulate interface OR build & run in simulator, it's still grey. It won't change! Will it be fixed on a real device, (I don't have 99$ dev account) do I need to fix it programatically, or is it hopeless for now?

    Also... can't I simply use – makeKeyAndVisible to switch between windows? It's what I'm doing, but the newly opened window won't respond to events. It definitely has user interaction enabled.
  2. TakeshiKovacs macrumors newbie

    Oct 12, 2008
    I was just playing around with the status bar today.. From what I could tell if you want it to be black you needed to set the status bar to be hidden initially and then mark it as black and show it in your applicationDidFinishedLaunching routine (if you didn't hide it initially it shows up grey for a second)..

    From what I understand, the visual display within Interface Builder is just a simulated view so you can get an idea of what the finished product will look like. It is listed as a "simulated metric"...
  3. dipaliP macrumors newbie

    Oct 6, 2008
    You can add

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];

    in applicationDidFinishLaunching
    and it will work for you
  4. kimabg macrumors newbie

    Jan 17, 2008

    You shouldn't use code to handle the status bar style except for in very special circumstance.

    Instead what you do is edit the Info.plist file of your project and set the UIStatusBarStyle key to either:

    UIStatusBarStyleBlackTranslucent or UIStatusBarStyleBlackOpaque depending on if you want your background to show through the status bar.

Share This Page