The alpha of a UIbutton goes to zero, and it becomes transparent when tapped. Ive added this IBAction
@IBAction func btnTapped(sender: UIButton) {
sender.highlighted = false
//...
}
and the UIButton still gets transparent when touched. How to prevent that?
I wrestled with this problem and finally fixed it by changing the button type from System to Custom.
Did you try something like:
yourButtonClass.setTitleColor(UIColor.blackColor(), forState: .Highlighted)
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