# Protocols Reference

# Protocols

The following protocols are available globally.

- `IGListDiffable`

  The `IGListDiffable` protocol provides methods needed to compare the identity and equality of two objects.

  See more

  #### Declaration

  Objective-C

      @protocol IGListDiffable

  Swift

      protocol ListDiffable

- `IGListAdapterDataSource`

  Implement this protocol to provide data to an `IGListAdapter`.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterDataSource <NSObject>

  Swift

      @MainActor protocol ListAdapterDataSource : NSObjectProtocol

- `IGListAdapterDelegate`

  Conform to `IGListAdapterDelegate` to receive display events for objects in a list.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterDelegate <NSObject>

  Swift

      protocol ListAdapterDelegate : NSObjectProtocol

- `IGListAdapterMoveDelegate`

  Conform to `IGListAdapterMoveDelegate` to receive interactive reordering requests.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterMoveDelegate <NSObject>

  Swift

      protocol ListAdapterMoveDelegate : NSObjectProtocol

- `IGListAdapterPerformanceDelegate`

  `IGListAdapterPerformanceDelegate` can be used to measure cell dequeue, display, size, and scroll callbacks.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterPerformanceDelegate <NSObject>

  Swift

      protocol ListAdapterPerformanceDelegate : NSObjectProtocol

- `IGListAdapterUpdateListener`

  Conform to this protocol to receive events about `IGListAdapter` updates.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterUpdateListener <NSObject>

  Swift

      protocol ListAdapterUpdateListener : NSObjectProtocol

- `IGListAdapterUpdaterDelegate`

  A protocol that receives events about `IGListAdapterUpdater` operations.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterUpdaterDelegate <NSObject>

  Swift

      protocol ListAdapterUpdaterDelegate : NSObjectProtocol

- `IGListBatchContext`

  Objects conforming to the IGListBatchContext protocol provide a way for section controllers to mutate their cells or reload everything within the section.

  See more

  #### Declaration

  Objective-C

      @protocol IGListBatchContext <NSObject>

  Swift

      protocol ListBatchContext : NSObjectProtocol

- `IGListBindable`

  A protocol for cells that configure themselves given a view model.

  See more

  #### Declaration

  Objective-C

      @protocol IGListBindable <NSObject>

  Swift

      protocol ListBindable : NSObjectProtocol

- `IGListBindingSectionControllerDataSource`

  A protocol that returns data to power cells in an `IGListBindingSectionController`.

  See more

  #### Declaration

  Objective-C

      @protocol IGListBindingSectionControllerDataSource <NSObject>

  Swift

      protocol ListBindingSectionControllerDataSource : NSObjectProtocol

- `IGListBindingSectionControllerSelectionDelegate`

  A protocol that handles cell selection events in an `IGListBindingSectionController`.

  See more

  #### Declaration

  Objective-C

      @protocol IGListBindingSectionControllerSelectionDelegate <NSObject>

  Swift

      protocol ListBindingSectionControllerSelectionDelegate : NSObjectProtocol

- `IGListCollectionContext`

  The collection context provides limited access to the collection-related information that section controllers need for operations like sizing, dequeuing cells, inserting, deleting, reloading, etc.

  See more

  #### Declaration

  Objective-C

      @protocol IGListCollectionContext <NSObject>

  Swift

      protocol ListCollectionContext : NSObjectProtocol

- `IGListCollectionViewDelegateLayout`

  Conform to `IGListCollectionViewDelegateLayout` to provide customized layout information for a collection view.

  See more

  #### Declaration

  Objective-C

      @protocol
          IGListCollectionViewDelegateLayout <UICollectionViewDelegateFlowLayout>

  Swift

      protocol IGListCollectionViewDelegateLayout : UICollectionViewDelegateFlowLayout

- `IGListCollectionViewLayoutCompatible`

  A protocol for layouts that defines interaction with an IGListCollectionView, for recieving updated section indexes.

  See more

  #### Declaration

  Objective-C

      @protocol IGListCollectionViewLayoutCompatible <NSObject>

  Swift

      protocol ListCollectionViewLayoutCompatible : NSObjectProtocol

- `IGListDisplayDelegate`

  Implement this protocol to receive display events for a section controller when it is on screen.

  See more

  #### Declaration

  Objective-C

      @protocol IGListDisplayDelegate <NSObject>

  Swift

      protocol ListDisplayDelegate : NSObjectProtocol

- `IGListScrollDelegate`

  Implement this protocol to receive display events for a section controller when it is on screen.

  See more

  #### Declaration

  Objective-C

      @protocol IGListScrollDelegate <NSObject>

  Swift

      protocol ListScrollDelegate : NSObjectProtocol

- `IGListSingleSectionControllerDelegate`

  A delegate that can receive selection events on an `IGListSingleSectionController`.

  See more

  #### Declaration

  Objective-C

      @protocol IGListSingleSectionControllerDelegate <NSObject>

  Swift

      @MainActor protocol ListSingleSectionControllerDelegate : NSObjectProtocol

- `IGListSupplementaryViewSource`

  Conform to this protocol to provide information about a list’s supplementary views. This data is used in `IGListAdapter` which then configures and maintains a `UICollectionView`. The supplementary API reflects that in `UICollectionView`, `UICollectionViewLayout`, and `UICollectionViewDataSource`.

  See more

  #### Declaration

  Objective-C

      @protocol IGListSupplementaryViewSource <NSObject>

  Swift

      protocol ListSupplementaryViewSource : NSObjectProtocol

- `IGListTransitionDelegate`

  Conform to `IGListTransitionDelegate` to provide customized layout information for a collection view.

  See more

  #### Declaration

  Objective-C

      @protocol IGListTransitionDelegate <NSObject>

  Swift

      protocol IGListTransitionDelegate

- `IGListUpdatingDelegate`

  Implement this protocol in order to handle both section and row based update events. Implementation should forward or coalesce these events to a backing store or collection.

  See more

  #### Declaration

  Objective-C

      @protocol IGListUpdatingDelegate <NSObject>

  Swift

      protocol ListUpdatingDelegate : NSObjectProtocol

- `IGListWorkingRangeDelegate`

  Implement this protocol to receive working range events for a list.

  The working range is a range near the viewport in which you can begin preparing content for display. For example, you could begin decoding images, or warming text caches.

  See more

  #### Declaration

  Objective-C

      @protocol IGListWorkingRangeDelegate <NSObject>

  Swift

      protocol ListWorkingRangeDelegate : NSObjectProtocol

© 2024 Instagram. All rights reserved. (Last updated: 2024-05-13)

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