Xamarin Forms iOS status bar text color
In Xamarin.Forms, there are three things you need to do to achieve white text in the iOS Status Bar. I've also posted a sample Xamarin.Forms app below that uses white text in the iOS Status Bar.
1. Update the Info.plist
In Info.plist
, add the Boolean Property View controller-based status bar appearance
and set its value to No
2. Use a NavigationPage & Set the Navigation Bar Text Color to White
In the Application
class (typically App.cs
), the MainPage
must be a NavigationPage
, and the BarTextColor
must be set to Color.White
3. Clean & Rebuild the App
Sometimes the compiler doesn't update the Status Bar Color until you Clean and Rebuild the app, so after making the changes in steps 1 & 2, clean the app and rebuild it.
Sample App
https://github.com/brminnick/SaveImageToDatabaseSampleApp/
The only way to change status bar in IOS for me was to use this code in FinishedLaunching in AppDelegate
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init ();
LoadApplication (.....);
app.SetStatusBarStyle(UIStatusBarStyle.LightContent, true);
return base.FinishedLaunching (app, options);
}