CollectionViewDelegateHorizontalListLayout

@objc
public protocol CollectionViewDelegateHorizontalListLayout : CollectionViewDelegate

The delegate for CollectionViewHorizontalListLayout

  • Asks the delegate for the width of the item at a given index path

    Declaration

    Swift

    @objc
    optional func collectionView(_ collectionView: CollectionView, layout collectionViewLayout: CollectionViewLayout, widthForItemAt indexPath: IndexPath) -> CGFloat

    Parameters

    collectionView

    The collection view containing the item

    collectionViewLayout

    The layout

    indexPath

    The index path for the item

    Return Value

    The desired width of the item at indexPath