Contents

prepare()

Prepares the layout object to begin laying out content.

Declaration

func prepare()

Discussion

The default implementation of this method does nothing. During the layout cycle, the collection view calls this method first to give you a chance to prepare any data needed during the layout operation. When defining a custom layout, you can override this method and use it to set up data structures or perform any initial computations needed to perform the layout later.

See Also

Providing Layout Information