UICollectionView like in Apple Music Browse section

Hello everyone, can someone please explain how to achieve this kind of paginated cells for UICollectionView in Swift. this shot is from Apple Music, on the playlists section it’s a paginated horizontal list, but when you scroll side ways four items (which are in 2 lines) move to the side. How can I achieve this?
the cells kind of wraps to the next page but still vertically arranged to fill the height of the pages

Hi @tobitech,
Apple apps are interesting as many a times they interestingly change from the UI guidelines.

However, most of their controls are paginated views, including the stack of three or four tracks per page. They are not populated if there is no data. These could be build using stackviews.

The UI is not a single element, it is a composition of multiple elements all of which sit in a scroll view and can be scrolled vertically. While each of the sections and sub sections scroll horizontally or vertically.

Have you had a play with StackViews? They are quite interesting, and you can achieve repeating elements without using Tables. However they do come with their own caveats. Here’s a selection of articles from this site for your reading. https://www.raywenderlich.com/?s=stackviews

cheers,

Jayant

Thanks. I’m aware of how pagination works in a scroll views and collectionview cells are you suggesting that the layout can built with stackviews as cells of a horizontal scrolling collectionview? it’s kind of complex because i would need to handle interactions with each of the tracks

@tobitech,
It’s a good start since if you know how to use these controls and Yes, you will have to handle the interactions for each of them.

cheers,

Jayant

This topic was automatically closed after 166 days. New replies are no longer allowed.