# Protocols

The following protocols are available globally.

- `IGListAdapterDataSource`

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

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterDataSource <NSObject>

  Swift

      protocol IGListAdapterDataSource

- `IGListAdapterDelegate`

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

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterDelegate <NSObject>

  Swift

      protocol IGListAdapterDelegate : NSObjectProtocol

- `IGListAdapterUpdaterDelegate`

  A protocol that receives events about `IGListAdapterUpdater` operations.

  See more

  #### Declaration

  Objective-C

      @protocol IGListAdapterUpdaterDelegate <NSObject>

  Swift

      protocol IGListAdapterUpdaterDelegate

- `IGListCollectionContext`

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

  See more

  #### Declaration

  Objective-C

      @protocol IGListCollectionContext <NSObject>

  Swift

      protocol IGListCollectionContext

- `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 IGListDiffable

- `IGListDisplayDelegate`

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

  See more

  #### Declaration

  Objective-C

      @protocol IGListDisplayDelegate <NSObject>

  Swift

      protocol IGListDisplayDelegate

- `IGListScrollDelegate`

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

  See more

  #### Declaration

  Objective-C

      @protocol IGListScrollDelegate <NSObject>

  Swift

      protocol IGListScrollDelegate

- `IGListSectionType`

  Implement this protocol in order to be used within the `IGListKit` data infrastructure and be registered for use in an `IGListAdapter`. An `IGListSectionType` conforming object represents a single instance of an object in a collection of objects.

  The infrastructure uses each `IGListSectionType` conforming object as a view model to populate and control cells as part of a section in a `UICollectionView`. `IGListSectionType` objects should be architected without knowledge of global state of the list in which they are contained.

  Index paths are used as a convenience for communicating the section index to each section object without allowing each section to mutate its own position within a list. The row of an index path can be directly mapped to a cell within an `IGListSectionType` conforming object.

  See more

  #### Declaration

  Objective-C

      @protocol IGListSectionType <NSObject>

  Swift

      protocol IGListSectionType

- `IGListSingleSectionControllerDelegate`

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

  See more

  #### Declaration

  Objective-C

      @protocol IGListSingleSectionControllerDelegate <NSObject>

  Swift

      protocol IGListSingleSectionControllerDelegate

- `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 IGListSupplementaryViewSource

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

  Swift

      protocol IGListUpdatingDelegate

- `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 IGListWorkingRangeDelegate

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

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