Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change Status Bar color for all view controllers?

I have been searching for a while now and I only found answers that describe to change color on one view controller not for all view controllers.

Is it possible to do it?

like image 258
ErikLm Avatar asked Nov 30 '22 22:11

ErikLm


1 Answers

Only two steps are needed to change the status bar style for the entire app. 🙂

Step 1

Add a new property to the project's Info.plist file and set it to false.

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Step 2

Go to your project's target and under General / Deployment Info, switch Status Bar Style from Default to Light.

The Status Bar Style option can be found right under the device orientation selectors of the Xcode project's editor.

Doing these steps will ensure the status bar behaves the same in the entire project.

like image 112
Pomme2Poule Avatar answered Dec 09 '22 17:12

Pomme2Poule