开发者

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

开发者 https://www.devze.com 2023-02-13 02:33 出处:网络
I have a button with a curved image set as its foreground image. It looks like: Now when the button is on pressed state, it shows up like this:

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

精彩评论

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