通过每个部分的水平滚动垂直滚动CollectionView部分(Vertical scrolling of CollectionView Sections with horizontal scroll

编程入门 行业动态 更新时间:2024-10-10 12:24:01
通过每个部分的水平滚动垂直滚动CollectionView部分(Vertical scrolling of CollectionView Sections with horizontal scrolling of each section)

我想制作下面的图片 。 集合视图应该可以在垂直方向上滚动,但是我想要多个单元格,它们将再次在一行中,并且可以水平滚动。 每个部分的滚动应独立于其他部分。 我正在使用的部分标题是通过补充标题。 你能提出一些好的方法来实现它吗?

I want to make something like the following image. the collection view should be scrollable in Vertical direction but i want multiple cells which would again be in one line and would be horizontally scrollable. Also scrolling at every section should be independent of every other section. The section headers I am using is via the supplementary headers. Can you please suggest any good way to achieve it?

最满意答案

我正在使用垂直滚动的UICollectionView,当我需要水平滚动时,我只需添加一个自定义的UICollectionViewCell,它有一个嵌套的UICollectionView,它为水平滚动设置。 委托方法和数据源方法您可以根据您的实现找出结果。

I am using a UICollectionView for the vertical scroll and, when I need horizontal scroll in it I just add a custom UICollectionViewCell, which has a nested UICollectionView in it set up for a horizontal scroll. The delegate methods and data source methods You can figure out depending on Your implementation.

更多推荐

本文发布于:2023-07-30 07:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1337110.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:水平   Vertical   CollectionView   scrolling   horizontal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!