# IGListCollectionViewLayoutCompatible Protocol Reference

# IGListCollectionViewLayoutCompatible

    @protocol IGListCollectionViewLayoutCompatible <NSObject>

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

- `-didModifySection:`

  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.

© 2019 Instagram. All rights reserved. (Last updated: 2019-11-20)

Generated by jazzy ♪♫ v0.12.0, a Realm project.