LifeOS LifeOS - 4 months ago 21x
Swift Question

Disable dark mode for mac OSX App in Swift

Is it possible to disable the dark mode for the mac app?

I only want it to show the default style of my app, even if the user uses dark mode on his mac.

I am using a popover.

Tried to use this:

self.popover.appearance = NSAppearanceNameAqua
but it tells me: cannot assign value of type String to type NSApperance.


You'll need initialize the name first:

popover.appearance = NSAppearance(named: NSAppearanceNameAqua)

You we're close.