IGListAdapterUpdaterDelegate
@protocol IGListAdapterUpdaterDelegate <NSObject>
A protocol that receives events about IGListAdapterUpdater operations.
-
Notifies the delegate that the updater will call -[UICollectionView performBatchUpdates:completion:].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willPerformBatchUpdatesWithCollectionView: (nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willPerformBatchUpdatesWithCollectionView collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
collectionView
The collection view that will perform the batch updates.
-
Notifies the delegate that the updater succesfully finished -[UICollectionView performBatchUpdates:completion:].
@discussion This event is called in the completion block of the batch update.
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater didPerformBatchUpdates:(nonnull IGListBatchUpdateData *)updates withCollectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, didPerformBatchUpdates updates: Any!, withCollectionView collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
collectionView
The collection view that performed the batch updates.
-
Notifies the delegate that the updater will call -[UICollectionView insertItemsAtIndexPaths:].
@discussion This event is only sent when outside of -[UICollectionView performBatchUpdates:completion:].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willInsertIndexPaths:(nonnull NSArray<NSIndexPath *> *)indexPaths collectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willInsertIndexPaths indexPaths: Any!, collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
indexPaths
An array of index paths that will be inserted.
collectionView
The collection view that will perform the insert.
-
Notifies the delegate that the updater will call -[UICollectionView deleteItemsAtIndexPaths:].
@discussion This event is only sent when outside of -[UICollectionView performBatchUpdates:completion:].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willDeleteIndexPaths:(nonnull NSArray<NSIndexPath *> *)indexPaths collectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willDeleteIndexPaths indexPaths: Any!, collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
indexPaths
An array of index paths that will be deleted.
collectionView
The collection view that will perform the delete.
-
Notifies the delegate that the updater will call -[UICollectionView reloadItemsAtIndexPaths:].
@discussion This event is only sent when outside of -[UICollectionView performBatchUpdates:completion:].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willReloadIndexPaths:(nonnull NSArray<NSIndexPath *> *)indexPaths collectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willReloadIndexPaths indexPaths: Any!, collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
indexPaths
An array of index paths that will be reloaded.
collectionView
The collection view that will perform the reload.
-
Notifies the delegate that the updater will call -[UICollectionView reloadSections:].
@discussion This event is only sent when outside of -[UICollectionView performBatchUpdates:completion:].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willReloadSections:(nonnull NSIndexSet *)sections collectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willReloadSections sections: Any!, collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
sections
The sections that will be reloaded
collectionView
The collection view that will perform the reload.
-
Notifies the delegate that the updater will call -[UICollectionView reloadData].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willReloadDataWithCollectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willReloadDataWithCollectionView collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
collectionView
The collection view that will be reloaded.
-
Notifies the delegate that the updater successfully called -[UICollectionView reloadData].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater didReloadDataWithCollectionView:(nonnull UICollectionView *)collectionView;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, didReloadDataWithCollectionView collectionView: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
collectionView
The collection view that reloaded.
-
Notifies the delegate that the collection view threw an exception in -[UICollectionView performBatchUpdates:completion:].
Declaration
Objective-C
- (void)listAdapterUpdater:(nonnull IGListAdapterUpdater *)listAdapterUpdater willCrashWithException:(nonnull NSException *)exception fromObjects:(nullable NSArray *)fromObjects toObjects:(nullable NSArray *)toObjects updates:(nonnull IGListBatchUpdateData *)updates;
Swift
func listAdapterUpdater(_ listAdapterUpdater: IGListAdapterUpdater!, willCrashWithException exception: Any!, fromObjects: Any!, toObjects: Any!, updates: Any!)
Parameters
listAdapterUpdater
The adapter updater owning the transition.
exception
The exception thrown by the collection view.
fromObjects
The items transitioned from in the diff, if any.
toObjects
The items transitioned to in the diff, if any.
updates
The batch updates that were applied to the collection view.