Create the App Store with UICollectionView Compositional Layouts

Compositional Layouts with UICollectionView

Photo by Neven Krcmarek on Unsplash

Prerequisites:

Terminology:

The Approach

The classes for compositional layouts

Diffable data source

The code

Placing a button on the navigation bar

Click for Gist

Sections

Click for Gist
Click for Gist
Click for Gist
Click for Gist
Click for Gist

The datasource

Click for Gist

Configuring the header

Click for Gist

The snapshot

Click for Gist

Cells

Click for Gist

WHY WHY WHY

Conclusion

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