I'm trying to change the button image color when it's disabled. To mention that my button may be also enabled
The thing is it's always grey.
sendCodeBtn.isEnabled = false
sendCodeBtn.setImage(#imageLiteral(resourceName: "validated_phone").withRenderingMode(.alwaysTemplate), for: .disabled)
sendCodeBtn.tintColor = Theme.defaultColor()
@IBAction btn : UIButton!
if btn.state == .isSelected{
btn.backgroundColor = UIColor.red
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With