Forum Xamarin.Forms

iOS Status Bar (Clock and battery indicator) Color

MiguelCervantesMiguelCervantes MXMember ✭✭✭

Hey guys!

I searched a lot but I can't get the status bar color of the elements to change. No matter what background color they remain black, I've tried adding UIViewControllerBasedStatusBarAppearance to the info.plist and setting UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false); but it doesn't work

Any ideas?

Tagged:

Answers

  • JohnHardmanJohnHardman GBUniversity admin

    @MiguelCervantes - When you create a NavigationPage for the main page of your app, you can simply do:

    navigationPage.BarBackgroundColor = Color.Pink; // change to whatever color you want

    This changes the color of the navigation bar and the status bar.

  • MiguelCervantesMiguelCervantes MXMember ✭✭✭

    hey @JohnHardman! I've tried that but with BarTextColor and it works! I just need to set it on the first NavigationPage and it persists correctly! thank you!!

  • clevertreeclevertree Member ✭✭

    How do I achieve this in Xamarin forms?

Sign In or Register to comment.