Instance Property


The layout used to organize the collected view’s items.


var collectionViewLayout: UICollectionViewLayout { get set }


Assigning a new layout object to this property causes the new layout to be applied (without animations) to the collection view’s items.

See Also

Changing the Layout

func setCollectionViewLayout(UICollectionViewLayout, animated: Bool)

Changes the collection view’s layout and optionally animates the change.

func setCollectionViewLayout(UICollectionViewLayout, animated: Bool, completion: ((Bool) -> Void)?)

Changes the collection view’s layout and notifies you when the animations complete.

func finishInteractiveTransition()

Tells the collection view to finish an interactive transition by installing the intended target layout.

func cancelInteractiveTransition()

Tells the collection view to abort an interactive transition and return to its original layout object.

Customizing Collection View Layouts

Customize a view layout by changing the size of cells in the flow or implementing a mosaic style.