Instance Method


Tells the layout object to prepare to be installed as the layout for the collection view.


func prepareForTransition(from oldLayout: UICollectionViewLayout)



The layout object installed in the collection view at the beginning of the transition. You might use this object to provide different ending attributes based on the starting layout object.


Prior to performing a layout transition, the collection view calls this method so that your layout object can perform any initial calculations needed to generate layout attributes.

See Also

Transitioning Between Layouts

func prepareForTransition(to: UICollectionViewLayout)

Tells the layout object that it is about to be removed as the layout for the collection view.

func finalizeLayoutTransition()

Tells the layout object to perform any final steps before the transition animations occur.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software