Protocols

The following protocols are available globally.

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

    See more

    Declaration

    Objective-C

    @protocol IGListAdapterDelegate <NSObject>

    Swift

    protocol IGListAdapterDelegate : NSObjectProtocol
  • 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
  • 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
  • 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. 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
  • 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
  • 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