我从下面的代码获得以下错误:的TableView删除错误
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[self.tableView reloadData];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[[FavouritesController sharedController] removeFavouriteAtIndex:indexPath.row];
[self.tableView reloadData];
}
else if (editingStyle == UITableViewCellEditingStyleNone) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
请你能告诉我如何解决它?
***在声明失败 - [UITableView的_endCellAnimationsWithContext:],/SourceCache/UIKit/UIKit-1448.89/UITableView.m:995 2011-04-19 21:30:17.854 APPNAME [546:707] ***因未捕获异常'NSInternalInconsistencyException'而终止应用程序,原因:'无效更新:第0节中的行数无效。更新后现有节中包含的行数(4)必须等于行数在更新之前包含在该部分(4)中,加上或减去从该部分插入或删除的行数(0插入,1删除)。'