开发者

iPhone: How to avoid background color coming up when button is selected?

I have a button with a curved image set as its foreground image. It looks like:

iPhone: How to avoid background color coming up when button is selected?

Now when the button is on pressed state, it shows up like this:

iPhone: How to avoid background color coming up when button is selected?

notice the grey rectangular color coming up around the edges. Is there any easy way to avoid the grey 开发者_StackOverflowbackground coming all over the rectangle ?


You need to set the property Shows Touch On Highlight to enabled.

Programmatically you can do that with:

[button setShowsTouchWhenHighlighted:YES];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜