-(
void
)tableView:(
UITableView
*)tableView commitEditingStyle:(
UITableViewCellEditingStyle
)editingStyle forRowAtIndexPath:(
NSIndexPath
*)indexPath{
//self.navigationItem.rightBarButtonItem = self.editButtonItem;这句话放到viewdidload里
//self.navigationItem.rightBarButtonItem = self.editButtonItem;这句话放到viewdidload里
if
(editingStyle ==
UITableViewCellEditingStyleDelete
) {
[ self . DataArray removeObjectAtIndex :indexPath. row ];
[ self . tableView setEditing : NO animated : YES ];
[tableView reloadData ];
}
[ self . DataArray removeObjectAtIndex :indexPath. row ];
[ self . tableView setEditing : NO animated : YES ];
[tableView reloadData ];
}
}