开发者

Borderless UIButton that highlights when touched

开发者 https://www.devze.com 2022-12-22 20:35 出处:网络
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 th开发者_运维技巧is?Create a UIButton in interface builder

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 th开发者_运维技巧is?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消