Pick the fix
You need horizontally scrolling rows of cards inside a vertical list, like the App Store. Best approach?
Hint 1 of 1
Which property makes a section scroll sideways?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Compositional layout sections with orthogonalScrollingBehavior = .groupPaging
Correct. One collection view, and each section scrolls sideways.
Why not the others?
- B A collection view inside each table view cell. It's the old workaround: more code, nested reuse and scroll bugs.
- C A UICollectionViewFlowLayout subclass. Flow layout scrolls in one direction only.
- D A UIScrollView per row. There is no reuse, so it doesn't scale.