如何在我的 tableView 中重新加载两个不相邻的部分?例如,如果我想重新加载第 0 节和第 4 节。我不能使用
[NSIndexSet indexSetWithIndexesInRange: withRowAnimation:];
因为它会重新加载中间的所有部分,对吧?
我也尝试使用连续调用
[NSIndexSet indexSetWithIndex: withRowAnimation:]
但它没有用,我收到了这个错误:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 1. The number of rows contained in an existing section after the update (8) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
编辑:对不起,我忘了在我的更新中提到重新加载的每个部分的行数更改。