UIButton设置按下背景色

http://stackoverflow.com/questions/14523348/how-to-change-the-background-color-of-a-uibutton-while-its-highlighted

UIButton只能设置按下的背景图片,所以我们可以曲线救国,将背景色转换为一张图片

Return an image made from the highlight colour you want. This could also be a category.

and then change the highlighted state of the button:

 

 

Leave a Reply

Your email address will not be published.