I am trying to insert a bunch of rows into an empty UITableView in one step using insertRowsAtIndexPaths. (I know this doesn't sound so useful, but it's a simplified version of what I really need to do.)
The problem that I see is that after making an insertRowsAtIndexPaths call, I get cellForRowAtIndexPath calls for every inserted row, not just the ones that are visible.
This does not seem right. And it is almost useless to me if that is so.
The only slightly strange other artifact that I see is that when I do this, it seems to revitalize the ranks in place. This is not a withRowAnimation parameter, as it is not set. But there seems to be some kind of higher-level animation concept here. I had the idea that since she was animating the lines in place, she believed that for more / all lines, cells were needed until they were pushed off the screen. But I can't turn off this animation without just using reloadData, which I would rather avoid.
Typically, I have a dataset that changes behind the scenes. I can carefully go through and build the changes to generate data for insert / delete / reload calls. But I can’t limit it to the fact that the screen since then does not match the data provider.
I suppose I should be missing something ... any ideas?
(I do this in a pair of beginUpdates / endUpdates, but that doesn't make any difference.)
source
share