NSCollectionViewDelegateFlowLayout
A set of methods that a delegate implements to provide layout information to a flow layout object in a collection view.
Declaration
protocol NSCollectionViewDelegateFlowLayout : NSCollectionViewDelegateOverview
Implement the methods of this protocol when you want to customize the layout behavior and perhaps return different values for different items or sections.
All of the methods in this protocol are optional, so you can implement only the methods you need to achieve the desired layout. If you do not implement a particular method, the flow layout object obtains default values from its own properties and applies them uniformly. Implement your methods in the object you assign to the delegate property of the collection view itself.
Topics
Getting the Size of Items
Getting the Section Spacing
collectionView(_:layout:insetForSectionAt:)collectionView(_:layout:minimumLineSpacingForSectionAt:)collectionView(_:layout:minimumInteritemSpacingForSectionAt:)
Getting the Header and Footer Sizes
See Also
Layouts
Implementing modern collection viewsNSCollectionViewFlowLayoutNSCollectionViewGridLayoutNSCollectionViewTransitionLayoutNSCollectionViewLayoutAttributesNSCollectionViewLayoutNSCollectionViewCompositionalLayoutNSCollectionViewCompositionalLayoutConfigurationNSCollectionViewCompositionalLayoutSectionProviderNSCollectionLayoutSectionOrthogonalScrollingBehavior