user840930
user840930

Reputation: 5578

How to turn off button shadow on button press of UIButton?

I've created a UIButton in InterfaceBuilder. When a user presses the button, the entire button is shaded grey. Is there a way to alter this behavior so the button is no longer shaded grey when the button is pressed?

Upvotes: 9

Views: 9699

Answers (2)

Kunal Khanna
Kunal Khanna

Reputation: 561

Change the button type to custom from system in the attributes inspector of the button

Upvotes: 2

Evan Mulawski
Evan Mulawski

Reputation: 55334

Uncheck "Highlighted Adjusts Image" in Interface Builder.

Alternatively, set the adjustsImageWhenHighlighted property of the UIButton to NO.

Upvotes: 31

Related Questions