iOS 11 has a new feature called \"Smart Invert Colors\", and I want to take advantage of that in my app. I already have my own dark mode implemented in my app, so I\'ll do t
To check if it smart invert is currently enabled you can use UIAccessibility.isInvertColorsEnabled. You can also get a notification when it changes by observing UIAccessibility.invertColorsStatusDidChangeNotification:
NotificationCenter.default.addObserver(forName: UIAccessibility.invertColorsStatusDidChangeNotification,
object: nil,
queue: OperationQueue.main) {
[weak self] _ in
if UIAccessibility.isInvertColorsEnabled {
// smart invert is enabled
} else {
}
}