IGListCollectionViewLayoutCompatible

Objective-C

@protocol IGListCollectionViewLayoutCompatible <NSObject>

Swift

protocol ListCollectionViewLayoutCompatible : NSObjectProtocol

A protocol for layouts that defines interaction with an IGListCollectionView, for recieving updated section indexes.

  • Called to notify the layout that a specific section was modified before invalidation. This can be used to optimize layout re-calculation.

    Note

    When updating a collection view (ex: calling -insertSections), -invalidateLayoutWithContext gets called on the layout object. However, the invalidation context doesn’t provide details on which index paths are being modified, which typically forces a full layout re-calculation. Layouts can use this method to keep track of which section actually needs to be updated on the following -invalidateLayoutWithContext. See IGListCollectionView.

    Declaration

    Objective-C

    - (void)didModifySection:(NSInteger)modifiedSection;

    Swift

    func didModifySection(_ modifiedSection: Int)

    Parameters

    modifiedSection

    The section that was modified.