开发者

iphone - setUserInteractionEnabled problem

I have a pa开发者_高级运维rent view contain a child custom view and many buttons. When I click on a button, it shows a child view and set [parentView setUserInteractionEnabled:NO]. Then I set [childView setUserInteractionEnabled:YES]. But it's not working, the child view isnot able to be enabled. I don't why. Please help me.

Thanks


 [parentView setUserInteractionEnabled:NO];

The snippet above disables user interaction for the parentView and all its subviews. So even if you follow it up with,

 [childView setUserInteractionEnabled:YES];

it won't work. You might want to rethink disabling user interaction on the parent view or do not add the childView as its subview.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜