Ashish Rupareliya
Ashish Rupareliya

Reputation: 76

Button click event not fire

Currently, I am working with one UI where I need button click It works perfectly when button alpha is 1 when I change it to 0 I can't get button touch event? Is there any reason for that?

Upvotes: 2

Views: 200

Answers (1)

Praveen Kumar
Praveen Kumar

Reputation: 296

From the apple documentation:

To hide a view visually, you can either set its hidden property to YES or change its alpha property to 0.0. A hidden view does not receive touch events from the system. However, hidden views do participate in autoresizing and other layout operations associated with the view hierarchy. Thus, hiding a view is often a convenient alternative to removing views from your view hierarchy, especially if you plan to show the views again at some point soon.

Upvotes: 3

Related Questions