我需要从tableView中删除一行,并且tableview应该得到更新,我该如何编程?从tableView删除记录 - 初学者
我到目前为止的工作;
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete)
{
[tableView endUpdates];
[tableView beginUpdates];
///??????????
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[tableView endUpdates];
}
}
我的表是使用NSArray
称为peopleList
稀少,所以,我怎么能删除记录和更新我的表视图?
你最终解决了这个问题吗? – bryanmac