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.

相关文章:

  • 2022-12-23
  • 2021-05-09
  • 2021-06-05
  • 2021-10-22
  • 2021-08-04
  • 2021-08-06
  • 2021-09-04
  • 2022-01-31
猜你喜欢
  • 2021-07-09
  • 2022-01-02
  • 2021-12-29
  • 2021-12-08
  • 2021-11-30
  • 2021-12-05
  • 2022-12-23
相关资源
相似解决方案