IGListIndexSetResult
@interface IGListIndexSetResult : NSObject
Result object returned when diffing with indexes.
-
Indexes inserted into the new collection.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSIndexSet *_Nonnull inserts;
Swift
var inserts: IndexSet { get }
-
Indexes deleted from the old collection.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSIndexSet *_Nonnull deletes;
Swift
var deletes: IndexSet { get }
-
Indexes in the new collection that need updated.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSIndexSet *_Nonnull updates;
Swift
var updates: IndexSet { get }
-
Moves from an index in the old collection to an index in the new collection.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<IGListMoveIndex *> *_Nonnull moves;
Swift
var moves: [Any] { get }
-
Convenience to query if the result has any changes.
Declaration
Objective-C
- (BOOL)hasChanges;
Swift
func hasChanges() -> Bool
Return Value
YES if the result has changes, NO otherwise.
-
Fetch the index of the object with identifier before the diff.
Declaration
Objective-C
- (NSUInteger)oldIndexForIdentifier:(nonnull id<NSObject>)identifier;
Swift
func oldIndex(forIdentifier identifier: NSObjectProtocol) -> UInt
Parameters
identifier
The diff identifier of the object. See -[IGListDiffable diffIdentifier].
Return Value
The index of the object before the diff, or NSNotFound.
-
Fetch the index of the object with identifier after the diff.
Declaration
Objective-C
- (NSUInteger)newIndexForIdentifier:(nonnull id<NSObject>)identifier;
Swift
func newIndex(forIdentifier identifier: NSObjectProtocol) -> UInt
Parameters
identifier
The diff identifier of the object. See -[IGListDiffable diffIdentifier].
Return Value
The index of the object after the diff, or NSNotFound.
-
Create a new result object transforming indexes that are both moved and updated into delete and inserts.
@discussion This is a convenience method for using a result object to perform UICollectionView and UITableView updates.
Declaration
Objective-C
- (nonnull IGListIndexSetResult *)resultWithUpdatedMovesAsDeleteInserts;
Swift
func withUpdatedMovesAsDeleteInserts() -> IGListIndexSetResult
-
Undocumented
Declaration
Objective-C
@interface IGListIndexSetResult : NSObject
-
Undocumented
Declaration
Objective-C
@interface IGListIndexSetResult : NSObject