When I launch my app, it shows the launch image and a black status bar. How can I change it so the status bar is light during launch? I have set the status bar appearance to light in my AppDelegate didFinishLoading method, and it works for the rest of the app.
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.
If you are using Storyboard , go to the NavigationController , select the navigationBar , click on the Attributes Inspector , then change the style . if you need light content (white status bar) set it anything except default lets say set style black And if you want dark content (black status bar) set it default .
To your Info.plist file add this key-value pair:
UIStatusBarStyle: UIStatusBarStyleLightContent
The default (black) value is UIStatusBarStyleDefault
.
You can also append ~iphone
or ~ipad
to the key.
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