Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the status bar text color in splash screen iOS 7

I know that are already some stackoverflow questions that say how to change the status bar for all view controllers. I am currently changing the color of status bar this way:

if(IS_IOS7)     [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; 

In the application:DidFinishLaunching

Additionally, I have changed the value of UIViewControllerBasedStatusBarAppearance in the plist to NO. However, in the splashscreen it stills shows the status bar text with the black color.

Is it possible to change the color of the status bar text color in the splash screen?

like image 491
Tiago Almeida Avatar asked Sep 19 '13 14:09

Tiago Almeida


People also ask

How do I change the color of my status bar text?

Step 1: After opening the android studio and creating a new project with an empty activity. Step 2: Navigate to res/values/colors. xml, and add a color that you want to change for the status bar.

Can we change status bar color in iOS?

You can change the status bar colour just with a single line of code. Just updated the markdown for iOS 13 and below.


1 Answers

In the project plist file add the "Status Bar Style" property (key is UIStatusBarStyle). Then ignore all the possible values listed in the drop down for this property and type UIStatusBarStyleLightContent instead.

And you don't have to set UIViewControllerBasedStatusBarAppearanceto NOin your plist, you can set the preferredStatusBarStyle you want to your view controllers.

like image 167
Vinzzz Avatar answered Sep 20 '22 15:09

Vinzzz