when setting an image the rippleBackgroundColor is drawn above the image and the rippleColor above the rippleBackgroundColor
I had to set rippleBackgroundColor to clear (remains the backgroundcolor) and the rippleColor with an alpha component < 1
buttonSelect.backgroundColor = UIColor.redColor
buttonSelect.rippleBackgroundColor = UIColor.clearColor() //or color with low alpha
buttonSelect.rippleColor = redColor().lightenColor().colorWithAlphaComponent(0.5)
buttonSelect.tintColor = white
buttonSelect.setImage(UIImage(named: "image")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate), forState: UIControlState.Normal)
// buttonSelect.setImage(UIImage(named: "image")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate), forState: UIControlState.Highlighted)
// buttonSelect.setImage(UIImage(named: "image")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate), forState: UIControlState.Selected)
buttonSelect.imageView?.contentMode = UIViewContentMode.ScaleAspectFit
states Highlighted and Selected do not give visible influences
when setting an image the rippleBackgroundColor is drawn above the image and the rippleColor above the rippleBackgroundColor
I had to set rippleBackgroundColor to clear (remains the backgroundcolor) and the rippleColor with an alpha component < 1
states Highlighted and Selected do not give visible influences