Performs needed tasks before items are inserted, deleted, or moved within the collection view.
SDK
- macOS 10.11+
Framework
- App
Kit
Declaration
- (void)prepareForCollectionViewUpdates:(NSArray<NSCollection View Update Item *> *)updateItems;
Parameters
updateItems
An array of
NSCollection
objects that identify the changes being made.View Update Item
Discussion
When items are inserted, deleted, or moved, the collection view calls this method to report those changes to the layout object. The default implementation uses the provided information to plan the layout animations needed to respond to the changes. Subclasses can override this method and use it to prepare for any custom changes, but you should always call super
at some point in your implementation.