开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜