Protocols

The following protocols are available globally.

  • Implement this protocol to provide data to power an IGListAdapter feed.

    See more

    Declaration

    Objective-C

    @protocol IGListAdapterDataSource <NSObject>

    Swift

    protocol IGListAdapterDataSource
  • A protocol that receives events about IGListAdapterUpdater operations.

    See more

    Declaration

    Objective-C

    @protocol IGListAdapterUpdaterDelegate <NSObject>

    Swift

    protocol IGListAdapterUpdaterDelegate
  • The collection context provides limited access to the collection related information that section controllers need for things like sizing, dequeing cells, insterting/deleting/reloading, etc.

    See more

    Declaration

    Objective-C

    @protocol IGListCollectionContext <NSObject>

    Swift

    protocol IGListCollectionContext
  • The IGListDiffable protocol provides the base methods needed to compare the identity and equality of two objects using one of the IGKAlgorithm functions.

    See more

    Declaration

    Objective-C

    @protocol IGListDiffable

    Swift

    protocol IGListDiffable
  • 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
  • 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
  • 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 feed. IGListSectionType objects should be architected without knowledge of global state of the feed they are contained in.

    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 feed. 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
  • A delegate that can receive selection events on an IGListSingleSectionController.

    See more

    Declaration

    Objective-C

    @protocol IGListSingleSectionControllerDelegate <NSObject>

    Swift

    protocol IGListSingleSectionControllerDelegate
  • Implement the methods of 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
  • 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
  • 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