I'm trying to make a "dark mode" for my app, and I'd like to do it in a really easy way. Is there any way to apply a filter or create another view over my other views so that they appear inverted - much like "Accessibility" on iOS 3.2+? I know that Core Image filters don't work on iPhone, but that's not a big deal to me - as long as there's a way to apply a different sort of filter.
Is this feasible on iPhone? How does Apple do it?
It sounds like you're thinking of placing a semi-transparent view filled with a dark color over your entire user interface. If that's the case, then you should read Forwarding Touch Events for a discussion of the issues involved.
Another way to do it is to change the set of colors and images that you use to draw your views.
Both these schemes will be easier and work better if you're dealing with custom views. If you're using an overlay, the document linked above explains that the standard UI elements don't take kindly to event forwarding. If you change colors, well... depending on what UI elements you're using, it may or may not be possible to substitute your own images and colors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With