Functions
The following functions are available globally.
-
Creates a diff using indexes between two collections.
Declaration
Objective-C
extern IGListIndexSetResult *_Nonnull IGListDiff( NSArray<id<IGListDiffable>> *_Nullable oldArray, NSArray<id<IGListDiffable>> *_Nullable newArray, IGListDiffOption option)Swift
func ListDiff(oldArray: [ListDiffable]?, newArray: [ListDiffable]?, option: IGListDiffOption) -> ListIndexSetResultParameters
oldArrayThe old objects to diff against.
newArrayThe new objects.
optionAn option on how to compare objects.
Return Value
A result object containing affected indexes.
-
Creates a diff using index paths between two collections.
Declaration
Objective-C
extern IGListIndexPathResult *_Nonnull IGListDiffPaths( NSInteger fromSection, NSInteger toSection, NSArray<id<IGListDiffable>> *_Nullable oldArray, NSArray<id<IGListDiffable>> *_Nullable newArray, IGListDiffOption option)Swift
func ListDiffPaths(fromSection: Int, toSection: Int, oldArray: [ListDiffable]?, newArray: [ListDiffable]?, option: IGListDiffOption) -> ListIndexPathResultParameters
fromSectionThe old section.
toSectionThe new section.
oldArrayThe old objects to diff against.
newArrayThe new objects.
optionAn option on how to compare objects.
Return Value
A result object containing affected indexes.
-
Check if an experiment is enabled in a bitmask.
Declaration
Objective-C
static inline BOOL IGListExperimentEnabled(IGListExperiment mask, IGListExperiment option)Swift
func ListExperimentEnabled(mask: IGListExperiment, option: IGListExperiment) -> BoolParameters
maskThe bitmask of experiments.
optionThe option to compare with.
Return Value
YESif the option is in the bitmask, otherwiseNO. -
Performs an index diff with an experiment bitmask.
See
IGListDiff().Declaration
Objective-C
extern IGListIndexSetResult *_Nonnull IGListDiffExperiment( NSArray<id<IGListDiffable>> *_Nullable oldArray, NSArray<id<IGListDiffable>> *_Nullable newArray, IGListDiffOption option, IGListExperiment experiments)Swift
func ListDiffExperiment(oldArray: [ListDiffable]?, newArray: [ListDiffable]?, option: IGListDiffOption, experiments: IGListExperiment) -> ListIndexSetResultParameters
oldArrayThe old array of objects.
newArrayThe new array of objects.
optionOption to specify the type of diff.
experimentsOptional experiments.
Return Value
An index set result object contained the changed indexes.
-
Performs a index path diff with an experiment bitmask.
See
IGListDiffPaths().Declaration
Objective-C
extern IGListIndexPathResult *_Nonnull IGListDiffPathsExperiment( NSInteger fromSection, NSInteger toSection, NSArray<id<IGListDiffable>> *_Nullable oldArray, NSArray<id<IGListDiffable>> *_Nullable newArray, IGListDiffOption option, IGListExperiment experiments)Swift
func ListDiffPathsExperiment(fromSection: Int, toSection: Int, oldArray: [ListDiffable]?, newArray: [ListDiffable]?, option: IGListDiffOption, experiments: IGListExperiment) -> ListIndexPathResultParameters
fromSectionThe old section.
toSectionThe new section.
oldArrayThe old array of objects.
newArrayThe new array of objects.
optionOption to specify the type of diff.
experimentsOptional experiments.
Return Value
An index path result object containing the changed indexPaths.