In the first and the second article, I looked at how to work with UICollectionViewCompositionalLayout and UICollectionViewDiffableDataSource. They are the main components for UICollectionView. But all of this is just a theory, how to use them in practice? How to build a complex layout with them?

This is what I will explain in this article. My solution is not universal, but using it I have handled all the requirements I came up with.

Let’s imagine that we have a library, our goal is to build a mobile app in which library clients can take and return books. …


In the last article, I shared my investigation of UICollectionViewCompositionalLayout. But all experienced developers know that UICollectionView contains two parts — Layout and Datasource. In this article, I will look at the second part, the instrument which also was introduced at the last WWDC — UICollectionViewDiffableDataSource.

If you have ever heard or read about the IGListKit, then UICollectionViewDiffableDataSource will also look familiar to you, as usual, Apple took some idea and presented their solution.

In this solution you can find two classes, they are doing all heavy lifting work for you — UICollectionViewDiffableDataSource and NSDiffableDataSourceSnapshot, they are both generic and…


Thanks to @juanlaube for sharing his UICollectionViewCompositionalLayout tips, which became the inspiration for this cover

In the current year, Apple showed mind-blowing conference WWDC to us. All iOS dev community are focusing on new cool frameworks and features(SwiftUI, Combine, RealityKit, etc.) trying to figure out how they are working and what to do with them. Many other small but very helpful for current applications features somehow stayed off the screen and today I want to share my own research about one of them — UICollectionViewCompositionalLayout.

I am pretty sure that every newbie iOS developer has started his learning path from the list view, this is a crucial UI element you can find almost in all…

Aleksej Gurin

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