objective c - Change iOS7 Status Bar Colour programmatically, mid-run? -


Let's try to change the position bar color mid-run, i.e. when an administrator loads. I change the background color of the scene, so I have to change it from black to white and vice versa.

I know that I can change it by using preferredStatusBarStyle . And setting in plist, but as far as I can see it will only set the view controller to launch

Can I do this?

  • Go to your application and add it as new line in Plist ; Color & amp; Add a toggle method @ Property (nonomatic) BOOL black; - (zero) toggle StatuSBar: (ID) sender {if (black) {[UIApplication shared application] setStatusBarStyle: Animated UIStatusBarStyleLightContent: Yes]; Black = no; } And {[UIApplication shared applicant] Setstats Bars Style: Uititas Bars Style Default Animated: Yes]; Black = yes; }}

    Here is a sample screenshot

    • When the menu is closed, the color is white

      < Img src = "https://i.stack.imgur.com/8hbeD.png" alt = "Enter image details here">

    • When the menu is open Color is black

      Enter image details here < / Ul>

      Hope that helps.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -