UITableView insertSections withRowAnimation

Parameters of [UITableView insertSections withRowAnimation]
sections
An index set that specifies the sections to insert in the receiving table view. If a section already exists at the specified index location, it is moved down one index location.
animation
A constant that indicates how the insertion is to be animated, for example, fade in or slide in from the left. See “Table Cell Insertion and Deletion Animation” for descriptions of these constants.

Discussion of [UITableView insertSections withRowAnimation]
UITableView calls the relevant delegate and data source methods immediately afterwards to get the cells and other content for visible cells.

Note the behavior of this method when it is called in an animation block defined by the beginUpdates and endUpdates methods. UITableView defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This happens regardless of ordering of the insertion and deletion method calls. This is unlike inserting or removing an item in a mutable array, where the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see “Batch Insertion and Deletion of Rows and Sections” in Table View Programming Guide for iOS.