I want to use "withRenderingMode(.alwaysTemplate)" to set an image on a button, but don't want to change any tint colour. Just want to set the default image.
let button = UIButton(type: .custom)
let image = UIImage(named: "image_name")?.withRenderingMode(.alwaysTemplate)
button.setImage(image, for: .normal)
button.tintColor = UIColor.red
Here I didn't want to use red tint colour. But if though I didn't use any tint colour, I didn't get actual image. I just want to set actual image.