I have a UIButton that has a white image of an arrow.
What I want to do is to change the buttons background color and keep the image as white while the button is pushed down.
I have tried this:
@IBAction func backButtonDidTouch(sender: AnyObject) {
backButton.backgroundColor = UIColor.blueColor()
}
But this will give the button a blue color soon as I lift my finger. I want the background color to change soon as I touch/press down the button. And also keep the image white.
Thanks