Inserts one or more sections in the table view, with an option to animate the insertion.
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
An index set that specifies the sections to insert in the table view. If a section already exists at the specified index location, it is moved down one index location.
A constant that indicates how the insertion is to be animated, for example, fade in or slide in from the left. See
UITablefor descriptions of these constants.
View .Row Animation
UITable calls the relevant delegate and data source methods immediately afterward to get the cells and other content for visible cells.
When this method is called in an animation block defined by the
UITable defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This order is followed regardless of how the insertion and deletion method calls are ordered. This is unlike inserting or removing an item in a mutable array, in which the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see Batch Insertion, Deletion, and Reloading of Rows and Sections in Table View Programming Guide for iOS.