# IGListCollectionViewDelegateLayout Protocol Reference

# IGListCollectionViewDelegateLayout

Objective-C

    @protocol
        IGListCollectionViewDelegateLayout <UICollectionViewDelegateFlowLayout>

Swift

    protocol IGListCollectionViewDelegateLayout : UICollectionViewDelegateFlowLayout

Conform to `IGListCollectionViewDelegateLayout` to provide customized layout information for a collection view.

- `-collectionView:layout:customizedInitialLayoutAttributes:atIndexPath:`

  Asks the delegate to customize and return the starting layout information for an item being inserted into the collection view.

  #### Declaration

  Objective-C

      - (UICollectionViewLayoutAttributes *)collectionView:
                                                (UICollectionView *)collectionView
                                                    layout:(UICollectionViewLayout *)
                                                               collectionViewLayout
                         customizedInitialLayoutAttributes:
                             (UICollectionViewLayoutAttributes *)attributes
                                               atIndexPath:(NSIndexPath *)indexPath;

  Swift

      func collectionView(_ collectionView: UICollectionView!, layout collectionViewLayout: UICollectionViewLayout!, customizedInitialLayoutAttributes attributes: UICollectionViewLayoutAttributes!, at indexPath: IndexPath!) -> UICollectionViewLayoutAttributes!

  #### Parameters

  `collectionView` | The collection view to perform the transition on.
  `collectionViewLayout` | The layout to use with the collection view.
  `attributes` | The starting layout information for an item being inserted into the collection view.
  `indexPath` | The index path of the item being inserted.

- `-collectionView:layout:customizedFinalLayoutAttributes:atIndexPath:`

  Asks the delegate to customize and return the final layout information for an item that is about to be removed from the collection view.

  #### Declaration

  Objective-C

      - (UICollectionViewLayoutAttributes *)
                           collectionView:(UICollectionView *)collectionView
                                   layout:
                                       (UICollectionViewLayout *)collectionViewLayout
          customizedFinalLayoutAttributes:
              (UICollectionViewLayoutAttributes *)attributes
                              atIndexPath:(NSIndexPath *)indexPath;

  Swift

      func collectionView(_ collectionView: UICollectionView!, layout collectionViewLayout: UICollectionViewLayout!, customizedFinalLayoutAttributes attributes: UICollectionViewLayoutAttributes!, at indexPath: IndexPath!) -> UICollectionViewLayoutAttributes!

  #### Parameters

  `collectionView` | The collection view to perform the transition on.
  `collectionViewLayout` | The layout to use with the collection view.
  `attributes` | The final layout information for an item that is about to be removed from the collection view.
  `indexPath` | The index path of the item being deleted.

© 2024 Instagram. All rights reserved. (Last updated: 2024-05-13)

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