【问题标题】:Adding other views to UIButton向 UIButton 添加其他视图
【发布时间】:2011-10-14 17:18:01
【问题描述】:

我想向UIButton 添加一些视图。例如多个UILabelsUIImages等。 我添加了这些视图,它们没有得到触摸事件。如何将触摸事件传递给UIButton

谢谢

【问题讨论】:

    标签: ios uiview uibutton


    【解决方案1】:

    将您添加到UIButton 的每个subviewsuserInteractionEnabled 属性设置为NO

    【讨论】:

      猜你喜欢
      • 2013-11-11
      • 1970-01-01
      • 2016-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-07
      • 2011-10-04
      相关资源
      最近更新 更多