Animates multiple insert, delete, reload, and move operations as a group.
- iOS 11.0+
- Mac Catalyst 13.0+Beta
- tvOS 11.0+
The block that performs the relevant insert, delete, reload, or move operations. In addition to modifying the table's rows, update your table's data source to reflect your changes. This block has no return value and takes no parameters.
A completion handler block to execute when all of the operations are finished. This block has no return value and takes the following parameter:
A Boolean value indicating whether the animations completed successfully. The value of this parameter is
NOif the animations were interrupted for any reason.
Use this method in cases where you want to make multiple changes to the table view in one single animated operation, as opposed to several separate animations. Use the block passed in the
updates parameter to specify all of the operations you want to perform.
Deletes are processed before inserts in batch operations. This means the indexes for the deletions are processed relative to the indexes of the table view’s state before the batch operation, and the indexes for the insertions are processed relative to the indexes of the state after all the deletions in the batch operation.