Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable touch animation in UIButton in iPhone

I want to disable the animation of button is touch down or selection. I want to mimic the feature that selection is happening on label. I am comfortable with the properties of button compare to uilabel because i can give my background image and it also help me in more issues.

Please help me in this?

like image 833
Vignesh Babu Avatar asked Oct 18 '25 19:10

Vignesh Babu


2 Answers

I think what you need is to unselect the "Highlighted adjusts image" option in Interface Builder: enter image description here

like image 97
phi Avatar answered Oct 20 '25 09:10

phi


2018 people, Swift 4.0:

Setting the button's adjustsImageWhenHighlighted property worked. Need this in my custom UITabBarController (e.g. large center tabBarItem).

like image 39
Glenn Posadas Avatar answered Oct 20 '25 08:10

Glenn Posadas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!