How to get UIButton Target, Action and Control events?

后端 未结 3 1045
时光取名叫无心
时光取名叫无心 2020-12-08 23:02

I am using UIImageView\'s with UIButtons a whole bunch. So, I created a custom class to permanently marry these two an make things a little simpler. It all works well unti

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 23:27

    UIControl's allTargets and allControlEvents are the way to start. The final piece of the puzzle is actionsForTarget:forControlEvent:, call it once for each target and event.

提交回复
热议问题