【问题标题】:add touch event to a uibutton when it comes in parents visible area当它进入父母可见区域时,将触摸事件添加到 uibutton
【发布时间】:2015-05-14 09:25:51
【问题描述】:

我有一个按钮,目前不在父母可见区域内,或者在可能发生触摸事件的区域内。

因此,当我在父母绑定中为该按钮设置动画时,我想为其添加一个触摸事件。所以有人知道吗?

任何帮助表示赞赏!

【问题讨论】:

    标签: ios uibutton touch-event


    【解决方案1】:

    最初将按钮的 userInteractionEnabled 属性设置为 NO,当您希望它能够对触摸事件进行操作时,请将其设置为 YES

    【讨论】:

      猜你喜欢
      • 2011-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多