UIButton under UIView should NOT be clickable
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开发者_JS百科't, though.
How can I prevent the buttons from reacting to taps?
Setting,
semiTransparentViewOnTopOfAll.userInteractionEnabled = YES;
should solve this problem. But, still if the problem persists, try,
semiTransparentViewOnTopOfAll.exclusiveTouch = YES;
do like this
button.userInteractionEnabled=NO;
by getting all buttons from view
精彩评论