Change colour of dark grey highlight when holding down custom UIButton? Change colour of dark grey highlight when holding down custom UIButton? ios ios

Change colour of dark grey highlight when holding down custom UIButton?


You said you set a custom image for the UIControlStateHighlighted state. This should disable the default behaviour.

If you still have problems you can disable this effect by setting the adjustsImageWhenHighlighted property to NO and use whatever custom effect you want.


If adjustsImageWhenHighlighted = NO is not working,set Button-Type to Custom (IB or programmatically).

Default Button-Type: System, changes behavior of highlighted button.


Swift 3:

myButton.adjustsImageWhenHighlighted = false