bpatrick100
bpatrick100

Reputation: 1291

How to use black translucent status bar upon startup - info.plist key/value doesn't seem to work

I have no problem setting the status bar of my app in the app delegate didFinishLaunchingWithOptions: messsage.

However, the problem is, when my app is launched, the splash screen (default.png) is displayed with the standard colored status bar (some type of silver color). Then, once my app loads, it is changed to black translucent.

So... after doing a bit of research, I was told to add the following key/value to my info.plist file: UIStatusBarStyle as the key UIStatusBarStyleBlackTranslucent as the value

I've done that, rebuilt, etc. However, I don't see anything different. I still get the default status bar when the splash screen is displayed. Same result with simulator as well as device.

Any suggestions?

Upvotes: 7

Views: 5525

Answers (2)

Hlung
Hlung

Reputation: 14328

Yes, you can. The info.plist is loaded "before" the app launches, thus you can add a Status bar style key to it and set the value to your desired style. Now you will have the status bar changed right from the splash screen.

Upvotes: 20

felixwcf
felixwcf

Reputation: 2107

OK I face the same problem with you, repeating the info.plist steps and it didn't work. This is what I do:

  1. Uninstall the app in your simulator/device.
  2. Clean the project and close the Xcode application.
  3. Go to your project folder -> build folder, clean everything in the Build folder, 'FileMaps', 'Headers', 'Intermediates', 'PrecompiledHeaders', 'Products' etc..
  4. Restart your project and go to the infoPlist list AGAIN to see whether the status bar type list disappear. If it is, set it again.
  5. Build your project.

I know this is quite an old post but I just want to updated it for others who face this problem in future.

Upvotes: 0

Related Questions