开发者

How to remove effect from a button?

开发者 https://www.devze.com 2023-04-11 14:16 出处:网络
In my app for iPad. First I have a welcome screen. Screen has a custom button with an image. When I press that button, it shows some gray effect before m开发者_如何学运维oving to the next screen. I do

In my app for iPad. First I have a welcome screen. Screen has a custom button with an image. When I press that button, it shows some gray effect before m开发者_如何学运维oving to the next screen. I don't want that effect to appear. How can I remove that gray effect?

Regards PC


That is the highlighted state of the UIButton. Per the UIButton Class Reference you can call [button adjustsImageWhenHighlighted:NO]; to remove it.


Set the image for the button to nil for the Highlighted state. [mybutton setImage:nil forState:UIControlStateHighlighted];

0

精彩评论

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