I want to implement a list containing several images grouped together like in the following mockup. The number of images to display in each section is dynamic and may vary. I also all images in a section to be always visible (without having to scroll horizontally or vertically).

What is the best approach to achieve this? I was making some tests with UICollectionView inside UITableViewCell but I can't make UICollectionView/UITableViewCell size expand automatically depending on the number of images inside. Is UICollectionView/UITableViewCell the way to go or is there a simpler approach?