When asked what UICollectionView is for, most iOS developers respond with some variation of 'It's like UITableView, but with a grid.' While this statement is mostly true, it greatly underestimates the utility of this powerful piece of UIKit. UICollectionView is actually a generic API for dynamically laying out a collection of views in an infinite scrollable canvas. The built in UICollectionViewFlowLayout implementation works very well for laying out a mostly uniform collection of views in a grid, but it only scratches the surface of UICollectionView. To go beyond the grid, developers can implement custom layouts dynamically driven by app data. Changes to the data can instantly affect the layouts. These changes can be automatically animated and even imbued with physical properties via UIKitDynamics. With a little math and a lot of creativity, UICollectionView can be used to render timelines, charts and graphs, parallax scrolling landscapes and more. The aim of this session is to show, through working examples, how flexible and powerful UICollectionView really is.
This talk was presented at AltConf in June 2015.