I have a rather complex data source for my UITableView. I am very carefully keeping it in sync with the tableview itself, inserting and removing rows/sections manually (with animation) whenever some data changes, and vice versa.

It is hard to be 100% confident in my ability to keep these matched up. The effects of a mis-match between the view and the data can be severe - for example, selecting a row and trying to do something to the associated object, when that object does not exist, will cause a crash. Many other bugs would lead to less obvious errors (operating on the wrong object, for example).

I was thinking about how all of this goes away if I call reloadData after each data change instead of manually modifying the view. But then I would lose the animation.

So perhaps I could somehow call reloadData **after** my animations have ended, as a safety measure.

* Does this sound like a good idea? Any alternatives?
* Where would I place this call so that the reload only occurs after animation (and would thus be invisible to the user if all is well)?
* Is there anything I could do to compare the view before and after reloadData, to identify if anything changed on the screen and throw a warning, for debugging purposes? I expect this would only work on rows that are in view, since offscreen content is dequeued only when required.

Interested in your thoughts!