Is it possible to invert the color of a UIView or UIScrollView and all its subviews in iOS?
If so how can I accomplish this?
First, you need to create an inverted color of current background color of UIView
. You can learn more about how to accomplish it on this StackOverflow question — How to get inverse color from UIColor?
Then, you need to iterate over all UIView subviews and apply inverted color as a background.
view.backgroundColor = invertedColor;
for (UIView *subview in view.subviews) {
subview.backgroundColor = invertedColor;
}