iOS UITableViewCell 表格式图滑动删除
//进入编辑模式,按下出现的编辑按钮后
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle ==UITableViewCellEditingStyleDelete)
{//如果编辑样式为删除样式
if (indexPath.row<[self.contactNameArray count])
{
[self.contactNameArray removeObjectAtIndex:indexPath.row];//移除数据源的数据
[self.contactNumberArray removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationLeft];//移除tableView中的数据
}
}
}