Member-only story
Building Responsive and Adaptive iOS App with UICollectionView
You can also read this article in my Xcoding With Alfian blog website using the link below.
UICollectionView
is an UIKit
view that manages collection of ordered items and presents the items using customizable layout. It was introduced by Apple in WWDC 2012 with the release of iOS 6 SDK. UICollectionView
interface is quite similar with the old UITableView
as it provides DataSource as a source to display the data and Delegate to handle interaction for each item.
Unlike UITableView
that display each row using a fixed list layout inside UITableViewCell
, UICollectionView
provides flexibility and customizability for developers to provide their own layout by subclassing UICollectionViewLayout
, it also supports custom decoration view, customizable size for each individual section view and cells. Apple itself provides us one layout out of the box to use called UICollectionViewFlowLayout
.