Ios5 tableView:CommittedItingStyle:for行索引路径:不工作

Ios5 tableView:CommittedItingStyle:for行索引路径:不工作,ios5,nsmutablearray,tableview,Ios5,Nsmutablearray,Tableview,因此,在我的viewDidLoad方法中,我调用了: self.navigationItem.rightBarButtonItem = self.editButtonItem; 随后在我的tableView:CommittedItingStyle:forRowAtIndexPath中,我执行以下操作: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editin

因此,在我的viewDidLoad方法中,我调用了:

self.navigationItem.rightBarButtonItem = self.editButtonItem;
随后在我的tableView:CommittedItingStyle:forRowAtIndexPath中,我执行以下操作:

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {

if (editingStyle == UITableViewCellEditingStyleDelete) {   
    [self.list removeObjectAtIndex:indexPath.row];
    [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}

但是,当我在实际运行应用程序时删除tableView中的一行时,在调用我的列表的removeObjectAtIndex时会引发异常。我尝试将其删除,但随后在tableView deleteRowsAtIndexPaths上引发了另一个异常:withRowAnimation:

请帮忙!
提前谢谢

self.list
需要是一个
NSMutableArray

您确定该索引中存在一个对象吗?