How to cancel a sequence of UITouch events?

前端 未结 12 2533
悲哀的现实
悲哀的现实 2020-12-17 09:43

I have a UIImage view that responds to touch events. I want to cancel the touch sequence, i.e., further calls to touchesMoved:, if the touch goes o

12条回答
  •  情话喂你
    2020-12-17 10:36

    You may create category to UITouch. You can to declare

    @property (nonatomic,strong,readwrite) UIView *view;
    

    And when you change touch.view to nil, for example, you can simulate end of dispatching touch events

提交回复
热议问题