I’m trying to dynamically update cells in a UITableView. The events are triggered by data received by background threads, so everything is asynchronous and it’s impossible to predict the order of the events.
I’m not sure what the workflow is supposed to be in this case. How can I make sure that the row count and indexpath are correct when calling reloadRowsAtIndexPaths:withRowAnimation? There could still be an animation going on by a previous call to deleteRowsAtIndexPaths:withRowAnimation.
If all the changes happen at the same time, I can use beginUpdates and endUpdates, but what do I do in the above situation?
Hanno, I recommend using a command object model to queue the changes on the main thread.
Here’s how:
A mix of a timer and animationDidFinish callbacks should do it.