I'm having some issues initializing an image in my code. I'm trying to change its tintColor property when the cell it sits in is highlighted like so:
iconImageView.tintColor = isHighlighted ? UIColor.white : UIColor.black
And to do so I'm initializing the image with the following line:
iconImageView.image = UIImage(named: imageName)?.renderingMode(.alwaysTemplate)
But I'm getting the following error:
Cannot call value of non-function type 'UIImage.RenderingMode'
Any suggestions?