//定义编辑样式
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
JKDZMTGoodBaseCell * cell = (JKDZMTGoodBaseCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.coverImg.enabled = NO;
return UITableViewCellEditingStyleDelete;
}
- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath{
MyLog(@"开始进入编辑状态");
JKDZMTGoodBaseCell * cell = (JKDZMTGoodBaseCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.coverImg.enabled = NO;
}
- (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(nullable NSIndexPath *)indexPath{
MyLog(@"结束编辑状态")
JKDZMTGoodBaseCell * cell = (JKDZMTGoodBaseCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.coverImg.enabled = YES;
}
//修改编辑按钮文字
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
return @"删除";
}