-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{
}
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
-(NSArray<UITableViewRowAction*>*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewRowAction *rowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:NSLocalizedStringFromTableInBundle(Unblock_Lb_Title, nil, [[LanguageTool getInstance] getLocaleBundle], @"") handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
NSLog(@"Delete");
[self showUnblockAlert:indexPath];
}];
rowAction.backgroundColor = [[UIStyleUtil getInstance]getRedColor];
NSArray *arr = @[rowAction];
return arr;
}
参考:
1.https://stackoverflow.com/questions/31739505/gif-crashing-on-ios-device?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa