Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable a UIButton without having fade effect

When I disable a button using Button.enabled = NO; the button fades out.

Is it possible to prevent it?

I want to disable the functionality of the button but I want it with the same look.

like image 282
death7eater Avatar asked Nov 22 '12 13:11

death7eater


2 Answers

Try using

[Button setUserInteractionEnabled:NO];

Hope it helps you!

like image 191
P.J Avatar answered Sep 23 '22 21:09

P.J


You can prevent the user to interact with button using this

yourButton.userInteractionEnabled = NO;
like image 1
Rajneesh071 Avatar answered Sep 21 '22 21:09

Rajneesh071