O'Reilly logo

iOS UICollectionView: The Complete Guide by Ash Furrow

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5. Crafting Custom Layouts Using UICollectionViewLayout

In Chapter 4, “Organizing Content with UICollectionViewFlowLayout,” I mentioned that UICollectionViewFlowLayout is great for line-based, breaking layouts. You also found out that you should always use it first. Sometimes, however, layouts are sufficiently complicated to warrant the use of something more powerful. UICollectionViewLayout is the superclass of UICollectionViewFlowLayout and it is work-intensive. You are responsible for everything—the layout of cells, the size of the collection view—everything. This chapter provides an example where you’d like to use it, revisits decoration views, and explores a little bit of changing between layouts programmatically with animation. At the end ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required