IGListDiffable
Objective-C
@protocol IGListDiffable
                Swift
protocol ListDiffable
                The IGListDiffable protocol provides methods needed to compare the identity and equality of two objects.
- 
                  
                  
Returns a key that uniquely identifies the object.
Note
Two objects may share the same identifier, but are not equal. A common pattern is to use the
NSObjectcategory for automatic conformance. However this means that objects will be identified on their pointer value so finding updates becomes impossible.Warning
This value should never be mutated.
Declaration
Objective-C
- (nonnull id<NSObject>)diffIdentifier;Swift
func diffIdentifier() -> any NSObjectProtocolReturn Value
A key that can be used to uniquely identify the object.
 - 
                  
                  
Returns whether the receiver and a given object are equal.
Declaration
Objective-C
- (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object;Swift
func isEqual(toDiffableObject object: (any ListDiffable)?) -> BoolParameters
objectThe object to be compared to the receiver.
Return Value
YESif the receiver and object are equal, otherwiseNO. 
View on GitHub