finalizeLayoutTransition()
Tells the layout object to perform any final steps before the transition animations occur.
Declaration
func finalizeLayoutTransition()Discussion
The collection view calls this method after it has gathered all of the layout attributes needed to perform a transition from one layout to another. You can use this method to clean up any data structures or caches created by your implementations of the prepareForTransition(from:) or prepareForTransition(to:) methods.