0
当按下按钮时,我正在添加这样的一行。它必须是第一部分的第一行:为什么当我向表视图添加一行时,我的应用崩溃了?
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
我不会在这里调用其他任何东西。没有 - 重载数据。在第0无效 行数的 数包含在 行:我不断收到这样的:
***终止应用程序由于未捕获的异常 “NSInternalInconsistencyException”, 原因:“无效的更新(6) 之后的现有节必须等于 更新(6)之前该节中包含的行 的行数,加上或减去从该 节插入或删除的行的编号 (插入1个,0删除)。”