Adding other views to UIButton

Q:

I want to add some views to UIButton, for example multiple UILabels, UIImages etc. One I add those view they do not get the touch events. How can I pass the touch events to UIButton?

Thanks

--------

A:

Set the userInteractionEnabled property of each of the subviews you added to your UIButton to NO.

原文地址:https://www.cnblogs.com/Clin/p/3384616.html