开发者

General XCode UI Question [duplicate]

开发者 https://www.devze.com 2023-03-26 10:45 出处:网络
This question already has an answer here: Custom UIButton + subviews = no events (1 answer) Closed 8 years ago.
This question already has an answer here: Custom UIButton + subviews = no events (1 answer) Closed 8 years ago.

Simple question: If I have a UIButton and fill it with different subviews (UIViews, let's say) to make a grid or a collage type thing or wha开发者_StackOverflowtever, will the button still work even if it's covered in other views?


If they are added as subviews to the UIButton (being a subclass of UIView),

[myButton addSubview: collageElementSubview];

there should be no problem (although I would disable user interaction on the subviews just to be safe).

0

精彩评论

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