death7eater
death7eater

Reputation: 1134

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.

Upvotes: 6

Views: 1705

Answers (2)

Rajneesh071
Rajneesh071

Reputation: 31081

You can prevent the user to interact with button using this

yourButton.userInteractionEnabled = NO;

Upvotes: 1

P.J
P.J

Reputation: 6587

Try using

[Button setUserInteractionEnabled:NO];

Hope it helps you!

Upvotes: 16

Related Questions