|
|
@@ -29,44 +29,44 @@
|
|
|
|
|
|
// Configure the view for the selected state
|
|
|
}
|
|
|
-//
|
|
|
-//- (void)touch:(NSSet<UITouch *> *)touches {
|
|
|
-// if (self.handlingTouch) {
|
|
|
-// return;
|
|
|
-// }
|
|
|
-// UITouch *touch = [[touches allObjects] lastObject];
|
|
|
-// if (self.touchDelegate && [self.touchDelegate respondsToSelector:@selector(touchedCell:withForce:)]) {
|
|
|
-// self.handlingTouch = YES;
|
|
|
-// [self.touchDelegate touchedCell:self withForce:touch.force];
|
|
|
-// }
|
|
|
-//}
|
|
|
-//
|
|
|
-//- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
+
|
|
|
+- (void)touch:(NSSet<UITouch *> *)touches {
|
|
|
+ if (self.handlingTouch) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ UITouch *touch = [[touches allObjects] lastObject];
|
|
|
+ if (self.touchDelegate && [self.touchDelegate respondsToSelector:@selector(touchedCell:withForce:)]) {
|
|
|
+ self.handlingTouch = YES;
|
|
|
+ [self.touchDelegate touchedCell:self withForce:touch.force];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
// if (self.touchColor) {
|
|
|
// _normalBGColor = self.backgroundColor;
|
|
|
// self.backgroundColor = self.touchColor;
|
|
|
// }
|
|
|
-//
|
|
|
-//// [super touchesBegan:touches withEvent:event];
|
|
|
-// self.handlingTouch = NO;
|
|
|
-// [self touch:touches];
|
|
|
-//}
|
|
|
-//
|
|
|
-//- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
-//// [super touchesMoved:touches withEvent:event];
|
|
|
-// [self touch:touches];
|
|
|
-//}
|
|
|
-//
|
|
|
-//- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
+
|
|
|
+ [super touchesBegan:touches withEvent:event];
|
|
|
+ self.handlingTouch = NO;
|
|
|
+ [self touch:touches];
|
|
|
+}
|
|
|
+
|
|
|
+- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
+ [super touchesMoved:touches withEvent:event];
|
|
|
+ [self touch:touches];
|
|
|
+}
|
|
|
+
|
|
|
+- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
// self.backgroundColor = _normalBGColor;
|
|
|
-//// [super touchesEnded:touches withEvent:event];
|
|
|
-// [self touch:touches];
|
|
|
-//}
|
|
|
-//
|
|
|
-//- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
+ [super touchesEnded:touches withEvent:event];
|
|
|
+ [self touch:touches];
|
|
|
+}
|
|
|
+
|
|
|
+- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
|
// self.backgroundColor = _normalBGColor;
|
|
|
-//// [super touchesCancelled:touches withEvent:event];
|
|
|
-// [self touch:touches];
|
|
|
-//}
|
|
|
+ [super touchesCancelled:touches withEvent:event];
|
|
|
+ [self touch:touches];
|
|
|
+}
|
|
|
|
|
|
@end
|