@@ -96,9 +96,10 @@ + (void)load {
9696 });
9797}
9898
99+ BeginIgnoreDeprecatedWarning
99100- (void )qmui_touchesBegan : (NSSet *)touches withEvent : (UIEvent *)event {
100101 self.touchEndCount = 0 ;
101- if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView ) {
102+ if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView || self. qmui_needsTakeOverTouchEvent ) {
102103 self.canSetHighlighted = YES ;
103104 [self qmui_touchesBegan: touches withEvent: event];
104105 dispatch_after (dispatch_time (DISPATCH_TIME_NOW, (int64_t )(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue (), ^{
@@ -112,7 +113,7 @@ - (void)qmui_touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
112113}
113114
114115- (void )qmui_touchesMoved : (NSSet *)touches withEvent : (UIEvent *)event {
115- if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView ) {
116+ if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView || self. qmui_needsTakeOverTouchEvent ) {
116117 self.canSetHighlighted = NO ;
117118 [self qmui_touchesMoved: touches withEvent: event];
118119 } else {
@@ -121,7 +122,7 @@ - (void)qmui_touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
121122}
122123
123124- (void )qmui_touchesEnded : (NSSet *)touches withEvent : (UIEvent *)event {
124- if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView ) {
125+ if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView || self. qmui_needsTakeOverTouchEvent ) {
125126 self.canSetHighlighted = NO ;
126127 if (self.touchInside ) {
127128 [self setHighlighted: YES ];
@@ -143,7 +144,7 @@ - (void)qmui_touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
143144}
144145
145146- (void )qmui_touchesCancelled : (NSSet *)touches withEvent : (UIEvent *)event {
146- if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView ) {
147+ if (self.qmui_automaticallyAdjustTouchHighlightedInScrollView || self. qmui_needsTakeOverTouchEvent ) {
147148 self.canSetHighlighted = NO ;
148149 [self qmui_touchesCancelled: touches withEvent: event];
149150 if (self.highlighted ) {
@@ -153,6 +154,7 @@ - (void)qmui_touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
153154 [self qmui_touchesCancelled: touches withEvent: event];
154155 }
155156}
157+ EndIgnoreDeprecatedWarning
156158
157159- (BOOL )qmui_pointInside : (CGPoint)point withEvent : (UIEvent *)event {
158160 if (([event type ] != UIEventTypeTouches)) {
0 commit comments