I'd like to present a UIView above a UIImageView, which gets its color dynamically, according to the UIImageView's average background color.
Although I did find some good solutions for getting the average color of an image, I could not figure out how to find the average color of a sub area of a UIImageView, which presents that image (as the image size is not necessarily equal to the view size).
Any idea how can such thing be achieved? I thought of adding a method which does that as a Category of UIImageView. Maybe something like:
- (UIColor *)averageColorForArea:(CGRect)area;