Member-only story

UICollectionViewLayoutGuide for Swift iOS Apps

Use UICollectionView properly

Steven Curtis
6 min readMar 1, 2023
Photo by Romain HUNEAU on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging

This article has been developed using Xcode 12.5, and Swift 5.4

Prerequisites:

Terminology

UICollectionViewLayoutGuide: A type of layout object that is used in conjunction with a collection view layout to define the placement and sizing of supplementary views and decoration views within the collection view

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…

--

--

No responses yet