TvOS UICollectionView scrolldirection

I am currently playing with the tvOS SDK.

I need a View collection with several sections and many elements, but only one row per section. . Thus, the user can scroll vertically through sections and horizontally elements in one line.

When I set the scrollDirection for the ViewFlowLayout collection to ". Horizontal", the sections and elements are all on the same line, which looks pretty shit.

Is there any other way to get this behavior? I was thinking of several collectionViews in scrollView, but it seems too complicated and superimposed on me.

Thanks in advance!

Greetings.

+4
source share
2 answers

I would think that the best and perhaps the only way around this would be to present the collection tables.

Someone correct me if I'm wrong, but the way I will probably deal with it. Hope this helps!

+4
source

I had a similar problem and it turned out that the Collection View that I used was not high enough.

It must be tall enough to place two cells on top of each other plus the gap between the spaces between them, and if it is tall enough, the Cell View Cell collection will appear in the top left corner of the collection in the storyboard.

Once it is tall enough, setting the stream to horizontal should work the way you want.

0
source

Source: https://habr.com/ru/post/1615717/


All Articles