Skip to content

issue with image #24

Description

@rogomantik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions