NSView

class NSView : NSResponder, NSAnimatablePropertyContainer, NSUserInterfaceItemIdentification, NSDraggingDestination, NSAppearanceCustomization, NSAccessibilityElementProtocol, NSAccessibilityProtocol

This is an extension to the standard NSView class, so we can see if we are in dark mode. Cribbed from here: https://stackoverflow.com/a/52523517/879365

  • Declaration

    Swift

    var isDarkMode: Bool { get }

    Return Value

    True, if the app is in Dark Mode.