Last active
June 26, 2018 16:26
-
-
Save nehayward/d5e022ced5487944b7850d622350c1c3 to your computer and use it in GitHub Desktop.
Get the current AppleInterface (Dark or Light)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct macOSMode { | |
static var isEnabled: Bool { | |
get { | |
return UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark" | |
} | |
set { | |
toggle(force: newValue) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment