Bill
Bill

Reputation: 45408

Borderless UIButton that highlights when touched

I'd like to create a UIButton with an image that has no borders (a la UIButtonTypeInfoDark) but that highlights when you tap it. How can I do this?

Upvotes: 0

Views: 1476

Answers (1)

Kevin Sylvestre
Kevin Sylvestre

Reputation: 38012

Create a UIButton in interface builder, change the type to custom (and select your image). Add an IBOutlet, then in your viewDidLoad set showsTouchWhenHighlighted to YES.

Upvotes: 2

Related Questions