How to change the color of the UIStatus panel?

I am trying to change the color of the status bar to black translucent. I changed my Info.plist UIStatusBarStyle UIStatusBarStyleBlackTranslucent

And I added these lines of code also in applicationDidFinishLaunching :()

[[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackTranslucent animated: NO];

After making these changes, my status bar will turn black translucent until my splash screen appears. Once my application loads completely, and when the content is displayed, it reverts to the default color by default. Can someone tell me where I'm wrong or where should I change?

Thanks in advance.

+3
source share
3 answers

Right click on your info.plist and "Add Line". From there you can choose what you want to add. There is a value called "Status Bar Style". Choose this. The corresponding value can also be demolished, and you can choose gray, black with alpha .5, black.

Save, reload the application. That is all I had to do.

(I know that qn is 1 month, but I thought I would leave the answer here anyway if I looked for ppl for it).

+13
source

(2 5 UITabBarController ). "Clip Subviews" , "" , -20 "y", - .

EDIT:

, , "Wants Full Screen" IB (/ wantsFullScreenLayout VC VC) , , , , , .

, , , , , , , , , - -, .

+1

You need to set the key UIStatusBarStyle(also diplayed as "status bar style") in your Info.plist application before UIStatusBarStyleBlackTranslucent.

0
source

Source: https://habr.com/ru/post/1765840/


All Articles