Let’s create a collection-esque view in SwiftUI

laptop with code on the screen
laptop with code on the screen
Photo by AltumCode on Unsplash

Building complex lists in iOS with UICollectionView has been painful. Before iOS 13, creating a layout with multiple sections, each with different behavior and different axes, usually ended up creating a custom UICollectionViewLayout. Fortunately, along with iOS 13, developers got UICollectionViewDiffableDataSource and UICollectionViewCompositionalLayout. They made it possible to create section layouts in a straightforward way. Linking data to a given section did not require writing a lot of additional code, thanks to the data based on the Hashable protocol.

SwiftUI is a great framework that will make it easier and faster for developers to create views in the future. Unfortunately…

Jakub Kiermasz

iOS Engineer at Zendesk

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store