IGListAdapterPerformanceDelegate

Objective-C

@protocol IGListAdapterPerformanceDelegate <NSObject>

Swift

protocol ListAdapterPerformanceDelegate : NSObjectProtocol

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

  • Will call -[IGListAdapter collectionView:cellForItemAtIndexPath:].

    Declaration

    Objective-C

    - (void)listAdapterWillCallDequeueCell:(nonnull IGListAdapter *)listAdapter;

    Swift

    func listAdapterWillCallDequeueCell(_ listAdapter: IGListAdapter)

    Parameters

    listAdapter

    The list adapter sending this information.

  • Did finish calling -[IGListAdapter collectionView:cellForItemAtIndexPath:].

    Declaration

    Objective-C

    - (void)listAdapter:(nonnull IGListAdapter *)listAdapter
         didCallDequeueCell:(nonnull UICollectionViewCell *)cell
        onSectionController:(nonnull IGListSectionController *)sectionController
                    atIndex:(NSInteger)index;

    Swift

    func listAdapter(_ listAdapter: IGListAdapter, didCallDequeue cell: UICollectionViewCell, on sectionController: IGListSectionController, at index: Int)

    Parameters

    listAdapter

    The list adapter sending this information.

    cell

    A cell that was dequeued.

    sectionController

    The section controller providing the cell.

    index

    Item index of the cell.

  • Will call -[IGListAdapter collectionView:willDisplayCell:forItemAtIndexPath:].

    Declaration

    Objective-C

    - (void)listAdapterWillCallDisplayCell:(nonnull IGListAdapter *)listAdapter;

    Swift

    func listAdapterWillCallDisplayCell(_ listAdapter: IGListAdapter)

    Parameters

    listAdapter

    The list adapter sending this information.

  • Did finish calling -[IGListAdapter collectionView:willDisplayCell:forItemAtIndexPath:].

    Note

    Keep in mind this also includes calling the IGListAdapter‘s collectionViewDelegate and workingRangeHandler.

    Declaration

    Objective-C

    - (void)listAdapter:(nonnull IGListAdapter *)listAdapter
         didCallDisplayCell:(nonnull UICollectionViewCell *)cell
        onSectionController:(nonnull IGListSectionController *)sectionController
                    atIndex:(NSInteger)index;

    Swift

    func listAdapter(_ listAdapter: IGListAdapter, didCallDisplay cell: UICollectionViewCell, on sectionController: IGListSectionController, at index: Int)

    Parameters

    listAdapter

    The list adapter sending this information.

    cell

    A cell that will be displayed.

    sectionController

    The section controller for that cell.

    index

    Item index of the cell.

  • Will call -[IGListAdapter collectionView:didEndDisplayingCell:forItemAtIndexPath:].

    Declaration

    Objective-C

    - (void)listAdapterWillCallEndDisplayCell:(nonnull IGListAdapter *)listAdapter;

    Swift

    func listAdapterWillCallEndDisplayCell(_ listAdapter: IGListAdapter)

    Parameters

    listAdapter

    The list adapter sending this information.

  • Did finish calling -[IGListAdapter collectionView:didEndDisplayingCell:forItemAtIndexPath:].

    Note

    Keep in mind this also includes calling the IGListAdapter‘s collectionViewDelegate and workingRangeHandler.

    Declaration

    Objective-C

    - (void)listAdapter:(nonnull IGListAdapter *)listAdapter
        didCallEndDisplayCell:(nonnull UICollectionViewCell *)cell
          onSectionController:(nonnull IGListSectionController *)sectionController
                      atIndex:(NSInteger)index;

    Swift

    func listAdapter(_ listAdapter: IGListAdapter, didCallEndDisplay cell: UICollectionViewCell, on sectionController: IGListSectionController, at index: Int)

    Parameters

    listAdapter

    The list adapter sending this information.

    cell

    A cell that was displayed.

    sectionController

    The section controller for that cell.

    index

    Item index of the cell.

  • Will call -[IGListAdapter collectionView:collectionViewLayout:sizeForItemAtIndexPath:].

    Declaration

    Objective-C

    - (void)listAdapterWillCallSize:(nonnull IGListAdapter *)listAdapter;

    Swift

    func listAdapterWillCallSize(_ listAdapter: IGListAdapter)

    Parameters

    listAdapter

    The list adapter sending this information.

  • Did finish calling -[IGListAdapter collectionView:collectionViewLayout:sizeForItemAtIndexPath:].

    Declaration

    Objective-C

    - (void)listAdapter:(nonnull IGListAdapter *)listAdapter
        didCallSizeOnSectionController:
            (nonnull IGListSectionController *)sectionController
                               atIndex:(NSInteger)index;

    Swift

    func listAdapter(_ listAdapter: IGListAdapter, didCallSizeOn sectionController: IGListSectionController, at index: Int)

    Parameters

    listAdapter

    The list adapter sending this information.

    sectionController

    The section controller providing the size.

    index

    Item index used to calculate the size.

  • Will call -[IGListAdapter scrollViewDidScroll:].

    Declaration

    Objective-C

    - (void)listAdapterWillCallScroll:(nonnull IGListAdapter *)listAdapter;

    Swift

    func listAdapterWillCallScroll(_ listAdapter: IGListAdapter)

    Parameters

    listAdapter

    The list adapter sending this information.

  • Did finish calling -[IGListAdapter scrollViewDidScroll:].

    Note

    Keep in mind this also includes calling the IGListAdapter‘s scrollViewDelegate and all visible IGListSectioControllers.

    Declaration

    Objective-C

    - (void)listAdapter:(nonnull IGListAdapter *)listAdapter
          didCallScroll:(nonnull UIScrollView *)scrollView;

    Swift

    func listAdapter(_ listAdapter: IGListAdapter, didCallScroll scrollView: UIScrollView)

    Parameters

    listAdapter

    The list adapter sending this information.

    scrollView

    The scroll view backing the UICollectionView.