Protocols

The following protocols are available globally.

  • Implement this protocol to provide data to an IGListAdapter.

    See more

    Declaration

    Objective-C

    @protocol IGListAdapterDataSource <NSObject>

    Swift

    protocol ListAdapterDataSource : NSObjectProtocol
  • Conform to IGListAdapterDelegate to receive display events for objects in a list.

    See more

    Declaration

    Objective-C

    @protocol IGListAdapterDelegate <NSObject>

    Swift

    protocol IGListAdapterDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol IGListAdapterUpdateListener <NSObject>
    
    /**
     Notifies a listener that the listAdapter was updated.
    
     @param listAdapter The `IGListAdapter` that updated.
     @param update The type of update executed.
     @param animated A flag indicating if the update was animated. Always `NO` for `IGListAdapterUpdateTypeReloadData`.
    
     @note This event is sent before the completion block in `-[IGListAdapter performUpdatesAnimated:completion:]` and
     `-[IGListAdapter reloadDataWithCompletion:]` is executed. This event is also delivered when an
     `IGListSectionController` updates via `-[IGListCollectionContext performBatchAnimated:updates:completion:]`.
     */
    - (void)listAdapter:(IGListAdapter *)listAdapter
        didFinishUpdate:(IGListAdapterUpdateType)update
               animated:(BOOL)animated;
    
    @end

    Swift

    protocol ListAdapterUpdateListener : NSObjectProtocol
  • 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
  • A protocol for cells that configure themselves given a view model.

    See more

    Declaration

    Objective-C

    @protocol IGListBindable <NSObject>

    Swift

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