My application's launch screen has a dark background color, so I'd like to set the status bar color to white while it's showing.
This differs from the question asked in How to change status bar style - iOS 12. That solution works for me for view controllers once the application is running but I can't find a way to apply it to the launch screen.
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. Step 3: In your MainActivity, add this code in your onCreate method.
You can change the status bar colour just with a single line of code. Just updated the markdown for iOS 13 and below.
Open your info. plist and set UIViewControllerBasedStatusBarAppearance to false . In the first function in AppDelegate. swift , which contains didFinishLaunchingWithOptions , set the color you want.
For that you have to change Status Bar Style to Light from "General" tab under project target.
Above only change the status bar color of launch screen to white & rest of controller have black color. If you wanted to change the entire project status bar color to white then add below too :
On you project plist file:
UIStatusBarStyleLightContent
NO
NO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With