I've tried changing the tintColor of a UIImageView
inside a UICollectionViewCell
after a tap by setting render mode of the icons to Template Image
and then setting the color by calling
iconView.tintColor = .blue
Problem: This fills the whole image with the chosen color, Instead of just changing the non-transparent parts.
This method has been working for me in the past, and I'm unable to figure out the problem. I assumed that the icons might have a white background instead of a transparent one, but that's not the case. Maybe it has something to do with the UIImageView
being inside a UICollectionViewCell
?
Help would be highly appreciated!
try this