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 the "color inversion" process myself when Smart Invert is enabled. What I want to know is:
I've searched everywhere at Google, StackOverflow, and Apple Developer Website for some time now and still couldn't find the answer.
Thanks in advance!
Update:
Thanks to @Toma's answer, I successfully managed to prevent iOS 11 from inverting views in my app. Now I have another problem...
For the detection part, it appears that UIAccessibility.isInvertColorsEnabled
(Swift 4.2) will only return true
if Smart Invert is on (iOS 11). At least it's enough for me, for now. I’m now wondering how to find out when Classic Invert is on. Post an updated answer below if you know how to do so! Thanks!
See iOS 11 UIView
's property accessibilityIgnoresInvertColors.