// 自定义左滑显示编辑按钮
-(NSArray<UITableViewRowAction*>*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewRowAction * rowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:NSLocalizedString(@"删除", nil) handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
NSLog(@"删除第%d行",indexPath.row);
[[Common CommonInstance].allDefenceNewsRecord removeObjectAtIndex:indexPath.row];
_newsArr = [DevWarningViewModel getTheUsefulDefenceWarningArr];
[self.myTableView reloadData];
[SVProgressHUD showSuccessWithStatus:@"删除成功"];
SVProgressHUD.minimumDismissTimeInterval = 0.1;
/*本地路径*/
NSString *filePath = [NSString stringWithFormat: @"%@/%@/defenceNewsRecord.text", DOCUMENTDIRECTORY, appDelegate.account.access_uid];
[[Common CommonInstance].allDefenceNewsRecord writeToFile:filePath atomically:YES];
}];
rowAction.backgroundColor = [[Common CommonInstance]colorFromHexString:@"61b0ce"];
NSArray *arr = @[rowAction];
return arr;
}