Most definitely! UICollectionViewLayout should be the right answer, but the thing is: the Slack iOS app was already built using UITableView, drawing many many custom cells.
We'll probably port someday to UICollectionView ;)
The downside is you lose out on many of the out of the box stuff, like cell background highlights that you know have to define yourself.
The upside is that you can now reuse the UIView everywhere, including non-subclasses of ScrollView.