So before iOS 13, I was setting the NavigationController.NavigationBar.BarStyle to control the colour of the text int he status bar. But now witht he new UINavigationBarAppearan
In Info.plist
, if added the Boolean Property UIViewControllerBasedStatusBarAppearance
and set its value to False
UIViewControllerBasedStatusBarAppearance
And you can change StatusBar TextColor by follow way :
UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, true);
In addition , this method should be invoked after View loaded totally . From IOS 13 ,Apple separates the UI
from the Controller
, which may affect the appearance of the PreferredStatusBarStyle
in the Controller. Before this problem is handled, you can use UIApplication.SharedApplication.StatusBarStyle
to set it.