UICollectionView Custom Layout: the Ultimate Tutorial
This project shows the basics about how to create a custom
UICollectionViewFlowLayout for a
To cover most of the configurations you can encounter while working on a
UICollectionView, I created 3 sections with 3 different layouts:
- section 1: a cell with fixed size
- section 2: a cell with a fixed width and a dynamic length
- sections 3 & 4: multiple cells aligned on a grid, with fixed size
I also added resizable headers in the sections 3 and 4.
You will find all the details about the project in 2 tutorials:
- UICollectionView Custom Layout: the Ultimate Tutorial - Part 1: how to create the
UICollectionView. It's an easy prerequisite for Part 2.
- UICollectionView Custom Layout: the Ultimate Tutorial - Part 2: how to create the
UICollectionViewFlowLayout... and how it works!
This project works on all iPhones and iPad (portrait, landscape, and with multitasking). Give it a try!