In my AppDelegate I have a way to change the UIUserInterfaceStyle:
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
MessagingCenter.Subscribe<Page, bool>(this, "ModeChanged", callback: OnModeChanged);
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
private void OnModeChanged(Page page, bool IsDarkModeEnabled)
{
if (IsDarkModeEnabled)
Window.OverrideUserInterfaceStyle = UIUserInterfaceStyle.Dark;
else
Window.OverrideUserInterfaceStyle = UIUserInterfaceStyle.Light;
}
}
What I would like to do is to make this change before the storyboard appears as I want to change the storyboard color, by checking some stored data (I'm not sure what I could check).
Is there a method that I could before the storyboard appears and is there a way in that method that I could access stored information that could tell me if my app is running in it's own internal light or dark mode?