Reputation: 3556
I have a view with some UIButtons on it. I add another - semi transparent - view on top of all, displaying some information to the user (actually, it's kind of a selfmade modal-alert). But the buttons under the semi-transparent view still react to taps. They shouldn't, though.
How can I prevent the buttons from reacting to taps?
Upvotes: 3
Views: 2055
Reputation: 51374
Setting,
semiTransparentViewOnTopOfAll.userInteractionEnabled = YES;
should solve this problem. But, still if the problem persists, try,
semiTransparentViewOnTopOfAll.exclusiveTouch = YES;
Upvotes: 13
Reputation: 826
do like this
button.userInteractionEnabled=NO;
by getting all buttons from view
Upvotes: 1