Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSCollectionViewControlMBS control.

NSCollectionViewControlMBS.performBatchUpdates(tag as variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Encapsulates multiple insert, delete, reload, and move operations into a single animated operation.

Use this method to make multiple changes to the collection view in one single animated operation. Normally, when you insert, delete, reload, or move items, the collection view animates each change separately. Making those same changes inside the updates block causes them to be animated at the same time. This method updates the current layout information as needed before and after performing the operations in the updates block.

The order in which you make calls to insert, delete, or otherwise modify the collection view is ignored. When executing your updates block, this method gathers information about the operations you requested without performing those operations. After it gathers that information, the method reorders the operations and performs all deletion operations first, followed by all insertion operations and then all move operations. (Reloading an item is treated as a delete operation followed by an insert operation at the same location.) As a result, the indexes you specify for each set of operations must reflect the changes made by any preceding operations.

You may call this method from inside your performBatchUpdatesWork or performBatchUpdatesCompleted events.

This method calls performBatchUpdatesWork event, where you can perform the work and later performBatchUpdatesCompleted event when finished.

The items on this page are in the following plugins: MBS MacControls Plugin.


The biggest plugin in space...