Instance Method


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


func prepareForTransition(to newLayout: UICollectionViewLayout)



The layout object to be installed in the collection view at the end of the transition. You might use this object to provide different starting attributes depending on the final 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(from: UICollectionViewLayout)

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

func finalizeLayoutTransition()

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