A Tour of UICollectionView

Description: UICollectionView is a flexible, powerful tool to help you achieve great user experiences in your applications. Hear how you can leverage these rich APIs to rapidly move from initial design ideas to polished shipping applications. Topics range from getting started to advanced update animations and layouts.

UICollectionViewLayout’s prepare()

UICollectionViewLayout’s prepare() method is called whenever the layout is invalidated, and in the case of UICollectionFlowLayout, our layout is invalidated whenever the UICollectionView's bounds of size changes.

For example when our app rotates on a phone or when our app is resized on an iPad. This is a great place to do any customization that takes the size of the UICollectionView into account.

PerformBatchUpdates

Missing anything? Corrections? Contributions are welcome 😃

Related

Written by

Federico Zanetello

Federico Zanetello

iOS Engineer with strong passion for Swift, minimalism, and design. When he’s not busy automating things, he can be found writing at FIVE STARS and/or playing with the latest shiny toys.