Functions

The following functions are available globally.

  • Create 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)

    Parameters

    oldArray

    The old objects to diff against.

    newArray

    The new objects to diff with.

    option

    An option on how to compare objects.

    Return Value

    Result object with effected indexes.

  • Create 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)

    Parameters

    fromSection

    The old section used to seed returned index paths.

    toSection

    The new section used to seed returned index paths.

    oldArray

    The old objects to diff against.

    newArray

    The new objects to diff with.

    option

    An option on how to compare objects.

    Return Value

    Result object with effected index paths.