Skip to content

Instantly share code, notes, and snippets.

@wongjustin99
Created September 8, 2019 12:31
Show Gist options
  • Save wongjustin99/1d32d840b73e9124479f26deb7b4eee1 to your computer and use it in GitHub Desktop.
Save wongjustin99/1d32d840b73e9124479f26deb7b4eee1 to your computer and use it in GitHub Desktop.
Dark mode detection in Swift
if traitCollection.userInterfaceStyle == .light {
print(“Light”)
} else {
print(“Dark”)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment