Keep UITableView scrolled to bottom as new rows are added
===

Part of an app I'm working on involves a messaging interface which I'm trying to make similar to the iOS Messages app's interface. When new messages are received or sent, I'd like the table view to scroll down and display the insertion animation.

So far, I've essentially done this:

    - (void)didReceiveNewMessage:(...) {
        [messages addObject:...];                            // add the new message to an array
        NSIndexPath *newIndexPath = [NSIndexPath ...];       // find out where the new cell goes
        [tableView insertRowAtIndexPath:newIndexPath ...];   // animate the insertion of the new message
        [tableView scrollToRowAtIndexPath:newIndexPath ...]; // do the scrolling
    }

This works if messages are coming in slowly. However, if I send myself a bunch of messages really quickly, I've noticed the table view will "become confused."

For example, if I quickly send the messages 1, 2, 3, 4, 5, 6, the table view will animate the insertion of 1, 2, 3, and 4, and then just stop scrolling. If I actually scroll the table view down manually, I can see 5 and 6 below. Anyone know of a better way to do this?

I did try `setContentOffset:` to scroll the table view, but this had the same effect.