# IGListAdapterUpdater Class Reference

# IGListAdapterUpdater

    @interface IGListAdapterUpdater : NSObject <IGListUpdatingDelegate>

An `IGListAdapterUpdater` is a concrete type that conforms to `IGListUpdatingDelegate`. It is an out-of-box updater for `IGListAdapter` objects to use.

Note

This updater performs re-entrant, coalesced updating for a list. It also uses a least-minimal diff for calculating UI updates when `IGListAdapter` calls `-performUpdateWithCollectionView:fromObjects:toObjects:completion:`.

- `delegate`

  The delegate that receives events with data on the performance of a transition.

  #### Declaration

  Objective-C

      @property (readwrite, nonatomic)
          id<IGListAdapterUpdaterDelegate> _Nullable delegate;

  Swift

      weak var delegate: ListAdapterUpdaterDelegate? { get set }

- `movesAsDeletesInserts`

  A flag indicating if a move should be treated as a delete, then insert operation.

  #### Declaration

  Objective-C

      @property (assign, readwrite, nonatomic) BOOL movesAsDeletesInserts;

  Swift

      var movesAsDeletesInserts: Bool { get set }

- `preferItemReloadsForSectionReloads`

  A flag indicating that section reloads should be treated as item reloads, instead of converting them to delete, then insert operations. This only applies if the number of items for the section is unchanged.

  Note

  If the number of items for the section is changed, we would fallback to the default behavior and convert it to delete + insert, because the collectionView can crash otherwise.

  Default is NO.

  #### Declaration

  Objective-C

      @property (assign, readwrite, nonatomic) BOOL preferItemReloadsForSectionReloads;

  Swift

      var preferItemReloadsForSectionReloads: Bool { get set }

- `allowsBackgroundReloading`

  A flag indicating whether this updater should skip diffing and simply call `reloadData` for updates when the collection view is not in a window. The default value is `YES`.

  Note

  This will result in better performance, but will not generate the same delegate callbacks. If using a custom layout, it will not receive `prepareForCollectionViewUpdates:`.

  Warning

  On iOS < 8.3, this behavior is unsupported and will always be treated as `NO`.

  #### Declaration

  Objective-C

      @property (assign, readwrite, nonatomic) BOOL allowsBackgroundReloading;

  Swift

      var allowsBackgroundReloading: Bool { get set }

- `experiments`

  A bitmask of experiments to conduct on the updater.

  #### Declaration

  Objective-C

      @property (assign, readwrite, nonatomic) IGListExperiment experiments;

  Swift

      var experiments: IGListExperiment { get set }

© 2019 Instagram. All rights reserved. (Last updated: 2019-11-20)

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