If my UIbutton is selected :
let image = UIImage(named: "photo-camera")?.imageWithRenderingMode(.AlwaysTemplate)
btnPhoto.setImage(image, forState: .Normal)
btnPhoto.tintColor = UIColor.orange()
If my UIbutton is not selected:
let image = UIImage(named: "photo-camera")?.imageWithRenderingMode(.AlwaysTemplate)
btnPhoto.setImage(image, forState: .Normal)
btnPhoto.tintColor = UIColor.grayColor()
Now, my issue is: when UIButton is not selected everything is displayed fine:
Instead when the UIButton is selected that is the result:
The tint color doesn't change the image but the background. I can't understand why.
btnPhotovariable. - dirtydanee