1
This commit is contained in:
@@ -64,6 +64,11 @@
|
||||
[self.minusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.equalTo(self.minusBadge);
|
||||
}];
|
||||
|
||||
// 点击右上角减号
|
||||
self.minusBadge.userInteractionEnabled = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapMinus)];
|
||||
[self.minusBadge addGestureRecognizer:tap];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -157,5 +162,13 @@
|
||||
return _coverView;
|
||||
}
|
||||
|
||||
@end
|
||||
#pragma mark - Actions
|
||||
|
||||
// 触发减号点击回调,由外部(VC)决定是否弹框与删除数据
|
||||
- (void)didTapMinus {
|
||||
if (self.onMinusTapped) {
|
||||
self.onMinusTapped(self);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user