# IGListIndexPathResult

    @interface IGListIndexPathResult : NSObject

A result object returned when diffing with sections.

- `inserts`

  The index paths inserted into the new collection.

  #### Declaration

  Objective-C

      @property (readonly, copy, nonatomic) NSArray<NSIndexPath *> *_Nonnull inserts;

  Swift

      var inserts: [IndexPath] { get }

- `deletes`

  The index paths deleted from the old collection.

  #### Declaration

  Objective-C

      @property (readonly, copy, nonatomic) NSArray<NSIndexPath *> *_Nonnull deletes;

  Swift

      var deletes: [IndexPath] { get }

- `updates`

  The index paths in the new collection that need updated.

  #### Declaration

  Objective-C

      @property (readonly, copy, nonatomic) NSArray<NSIndexPath *> *_Nonnull updates;

  Swift

      var updates: [IndexPath] { get }

- `moves`

  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: [Any] { get }

- `-hasChanges`

  Returns whether the result has any changes or not.

  #### Declaration

  Objective-C

      - (BOOL)hasChanges;

  Swift

      func hasChanges() -> Bool

  #### Return Value

  `YES` if the result has changes, `NO` otherwise.

- `-oldIndexPathForIdentifier:`

  Returns the index path of the object with the specified identifier before the diff.

  See

  `-[IGListDiffable diffIdentifier]`.

  #### 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`.

- `-newIndexPathForIdentifier:`

  Returns the index path of the object with the specified identifier after the diff.

  See

  `-[IGListDiffable diffIdentifier]`.

  #### 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`.

- `-resultForBatchUpdates`

  Creates a new result object with operations safe for use in `UITableView` and `UICollectionView` batch updates.

  #### Declaration

  Objective-C

      - (nonnull IGListIndexPathResult *)resultForBatchUpdates;

  Swift

      func forBatchUpdates() -> IGListIndexPathResult

© 2017 Instagram. All rights reserved. (Last updated: 2017-01-04)

Generated by jazzy ♪♫ v0.7.3, a Realm project.