IGListIndexPathResult
@interface IGListIndexPathResult : NSObject
A result object returned when diffing with sections.
-
The index paths inserted into the new collection.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<NSIndexPath *> *_Nonnull inserts;
Swift
var inserts: [IndexPath] { get }
-
The index paths deleted from the old collection.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<NSIndexPath *> *_Nonnull deletes;
Swift
var deletes: [IndexPath] { get }
-
The index paths in the old collection that need updated.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<NSIndexPath *> *_Nonnull updates;
Swift
var updates: [IndexPath] { get }
-
The moves from an index path in the old collection to an index path in the new collection.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<IGListMoveIndexPath *> *_Nonnull moves;
Swift
var moves: [ListMoveIndexPath] { get }
-
A Read-only boolean that indicates whether the result has any changes or not.
YES
if the result has changes,NO
otherwise.Declaration
Objective-C
@property (readonly, assign, nonatomic) BOOL hasChanges;
Swift
var hasChanges: Bool { get }
-
Returns the index path of the object with the specified identifier before the diff.
Declaration
Objective-C
- (nullable NSIndexPath *)oldIndexPathForIdentifier: (nonnull id<NSObject>)identifier;
Swift
func oldIndexPath(forIdentifier identifier: NSObjectProtocol) -> IndexPath?
Parameters
identifier
The diff identifier of the object.
Return Value
The index path of the object before the diff, or
nil
. -
Returns the index path of the object with the specified identifier after the diff.
Declaration
Objective-C
- (nullable NSIndexPath *)newIndexPathForIdentifier: (nonnull id<NSObject>)identifier;
Swift
func newIndexPath(forIdentifier identifier: NSObjectProtocol) -> IndexPath?
Parameters
identifier
The diff identifier of the object.
Return Value
The index path of the object after the diff, or
nil
. -
Creates a new result object with operations safe for use in
UITableView
andUICollectionView
batch updates.Declaration
Objective-C
- (nonnull IGListIndexPathResult *)resultForBatchUpdates;
Swift
func forBatchUpdates() -> ListIndexPathResult