When I build my macOS app in Xcode 10 under Mojave, it automatically makes my app adopt Dark Mode. I am not ready yet to implement Dark Mode for my app.
How do I disable Dark Mode for my app, so it appears aqua in both the light and dark mode under macOS?
On your phone, open the Settings app. Tap Display. Turn Dark theme on or off.
Dark mode can also be quickly enabled from Control Center. Click the switch icon in the menu bar and click Display, then choose Dark Mode to switch the feature on and off.
Start by running the Google Search app on your device and then navigate to the More button. Next, click on Settings. In the Settings screen, go to Themes. A screen will allow you to choose between the Dark, Light, and System default settings.
First, to turn Dark mode on, go to System Preferences > General and click the Dark thumbnail to the right of Appearance. Mojave immediately switches to Dark mode, turning light backgrounds dark and swapping the text color from dark to light.
if (@available(macOS 10.14, *))
{
NSApp.appearance = [NSAppearance appearanceNamed: NSAppearanceNameAqua];
}
See documentation.
From Supporting Dark Mode in Your Interface: Choosing a Specific Appearance for Your App – Opt Out of Dark Mode:
Apps linked against macOS 10.14 or later should support both light and dark appearances. […]
If you need extra time to work on your app's Dark Mode support, you can temporarily opt out by including the
NSRequiresAquaSystemAppearance
key (with a value ofYES
) in your app’sInfo.plist
file. Setting this key toYES
causes the system to ignore the user's preference and always apply a light appearance to your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With