问题:(删除tableview中的section时)
Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘, reason: ‘Invalid update: invalid number of sections. The number of sections contained in the table view after the update (5) must be equal to the
number of sections contained in the table view before the update (5), plus or minus the number of sections inserted or deleted (0 inserted, 1 deleted).‘
解决:
[self.tableview
beginUpdates];
// 必须添加 开始更新 和结束更新,中间必须删除 数据
[self.tableview
deleteSections:indexset withRowAnimation:UITableViewRowAnimationRight];
[_arrayTableCellData
removeObjectAtIndex:row];
[self.tableview
endUpdates];
版权声明:本文为博主原创文章,未经博主允许不得转载。
'Invalid update: invalid number of sections. The number of sections contained in the table view aft