Mac Catalyst NSToolbar / Title Bar Doesn't Honor overrideUserInterfaceStyle value of the UIWindow

It is normal to have a preference like: “Always use Dark Mode” in an app to allow the user to opt in to Dark mode in the current app without turning it on System wide.

On iOS you can manage this by detecting the change in the app preference and when it is turned on you set the overrideUserInterfaceStyle property on the UIWindow to UIUserInterfaceStyleDark. On Mac Catalyst however this does not work. If you set the overrideUserInterfaceStyle property to UIUserInterfaceStyleDark the NSWindow underneath doesn’t update to reflect dark mode. The titlebar doesn’t update for dark mode either. And neither does the NSToolbar. Only UIViewControllers inside the UIWindow reflect the overrideUserInterfaceStyle

Ideally it would be great if there was a overrideUserInterfaceStyle property on UIApplication but there is not. Is there a way to force the NSWindow/NSToolbar created by Mac Catalyst to use a particular appearance (without an Appkit bundle)?

Mac Catalyst NSToolbar / Title Bar Doesn't Honor overrideUserInterfaceStyle value of the UIWindow
 
 
Q