IGListBatchUpdateData
@interface IGListBatchUpdateData : NSObject
An instance of IGListBatchUpdateData
takes section indexes and item index paths
and performs cleanup on init in order to perform a crash-free
update via -[UICollectionView performBatchUpdates:completion:]
.
-
Section insert indexes.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSIndexSet *_Nonnull insertSections;
-
Section delete indexes.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSIndexSet *_Nonnull deleteSections;
-
Section moves.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSSet<IGListMoveIndex *> *_Nonnull moveSections;
-
Item insert index paths.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray<NSIndexPath *> *_Nonnull insertIndexPaths;
-
Item delete index paths.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray<NSIndexPath *> *_Nonnull deleteIndexPaths;
-
Item moves.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray<IGListMoveIndexPath *> *_Nonnull moveIndexPaths;
-
-initWithInsertSections:deleteSections:moveSections:insertIndexPaths:deleteIndexPaths:moveIndexPaths:
Creates a new batch update object with section and item operations.
Declaration
Objective-C
- (nonnull instancetype) initWithInsertSections:(nonnull NSIndexSet *)insertSections deleteSections:(nonnull NSIndexSet *)deleteSections moveSections:(nonnull NSSet<IGListMoveIndex *> *)moveSections insertIndexPaths:(nonnull NSArray<NSIndexPath *> *)insertIndexPaths deleteIndexPaths:(nonnull NSArray<NSIndexPath *> *)deleteIndexPaths moveIndexPaths:(nonnull NSArray<IGListMoveIndexPath *> *)moveIndexPaths;
Parameters
insertSections
Section indexes to insert.
deleteSections
Section indexes to delete.
moveSections
Section moves.
insertIndexPaths
Item index paths to insert.
deleteIndexPaths
Item index paths to delete.
moveIndexPaths
Item index paths to move.
Return Value
A new batch update object.