|
|
@@ -9,6 +9,9 @@
|
|
|
#import "ResultCell.h"
|
|
|
|
|
|
@implementation ResultCell
|
|
|
+{
|
|
|
+ UIColor *_normalBGColor;
|
|
|
+}
|
|
|
|
|
|
- (void)awakeFromNib {
|
|
|
[super awakeFromNib];
|
|
|
@@ -32,19 +35,30 @@
|
|
|
}
|
|
|
|
|
|
- (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 {
|
|
|
+ self.backgroundColor = _normalBGColor;
|
|
|
+ [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];
|
|
|
}
|
|
|
|