Member-only story
Mastering UICollectionViewLayoutGuide: A Comprehensive Guide to Building Custom Layouts in UICollectionView
Use UICollectionView properly
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.5, and Swift 5.4
Prerequisites:
- You will be expected to be aware of how to make a Single View Application
Terminology
UICollectionViewLayerAttributes: A layout object that manages the layout-related attributes for a given item in a collection view
UICollectionViewFlowLayout: A layout object that organizes items into a grid with optional header and footer views for each section
UICollectionViewCell: The on-screen cell for the UICollectionView type
UICollectionViewLayout: An abstract base class for generating layout information for a collection view
Implement a UICollectionView
We are going to implement UICollectionView
where we can scroll vertically or horizontally, and view several UICollectionViewCell
items.