UICollectionView in SwiftUI!!!
Nov 5 · 2 min read
Hey all. If you started to learn SwiftUI you may see that it has no CollectionView. Can we create it? Why NOT!?
Let’s start!
We need to create viewModel for our CollectionView. Let’s do it:

In this step, we created a protocol for our viewModel
var layout must provide a base layout for our collectionView
Let’s create viewModel class!

Now we have base UICollectionView Datasource class =)
And one more thing!
Creating CollectionView for SwiftUI!!!



YEAH, BABY!!!! We have our loving UICollectionView on the SwiftUI!!!
