开发者

How to darken a custom UIButton

I've subclassed the UIButton class and now a custom view will be drawn using quartz 2d. It all looks fine, but how can I darken the button at clicking it. How can I set the views for the different states if I am using quartz in the same clas开发者_Python百科s to draw the button?

Thanks for your help


When a button is tapped, the setHighlighted: method gets called. If you overwrite it, you can do whatever you want upon tap (and release). Redraw or switch views.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜