Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with image #24

Open
rogomantik opened this issue Oct 3, 2016 · 0 comments
Open

issue with image #24

rogomantik opened this issue Oct 3, 2016 · 0 comments

Comments

@rogomantik
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant