apply(_:)
Applies the specified layout attributes to the view.
Declaration
func apply(_ layoutAttributes: UICollectionViewLayoutAttributes)Parameters
- layoutAttributes:
The layout attributes to apply.
Discussion
The default implementation of this method does nothing.
If the layout object supports custom layout attributes, you can use this method to apply those attributes to the view. In such a case, the layoutAttributes parameter should contain an instance of a subclass of UICollectionViewLayoutAttributes. You do not need to override this method to support the standard layout attributes of the UICollectionViewLayoutAttributes class. The collection view applies those attributes automatically.