Created
February 1, 2018 15:29
-
-
Save mkj-is/65ec4c7b160d64f0c265c8f93bbc8014 to your computer and use it in GitHub Desktop.
Dark mode inspectable
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
extension UIView { | |
@IBInspectable var ignoresInvertColors: Bool { | |
get { | |
if #available(iOS 11.0, *) { | |
return accessibilityIgnoresInvertColors | |
} | |
return false | |
} | |
set { | |
if #available(iOS 11.0, *) { | |
accessibilityIgnoresInvertColors = newValue | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://medium.com/@mkj_is/smart-invert-simple-way-to-implement-dark-mode-in-your-ios-app-fccb1a4af439