UICollectionView中不同单元格大小的自定义布局 [英] Custom layout for different cell sizes in UICollectionView
问题描述
我想使用新的UICollectionView,但我不确定是否可以构建以下内容:
I would like to use the new UICollectionView, but I'm not sure if it is possible to build the following:
如您所见,有两种不同的细胞类型。一个是肖像,一个是风景。当我使用流布局时,它总是创建与最高单元一样高的单元行。不是我需要的这种流畅布局。
As you can see, there are two different cell types. One is portrait, one is landscape. When I use the flow layout, it always creates rows of cells which are as high as the tallest cell. Not this kind of "fluid" layout I need.
是否有可能通过UICollectionView实现这种布局?
Is it possible at all to achieve this kind of layout with a UICollectionView?
以前有人做过这样的事吗?有样品吗?我已经查看了很多教程和课程参考...
Has anyone done something like this before? Are there any samples? I already checked out many tutorials and the Class References ...
谢谢!
推荐答案
您可以查看 https://github.com/bryceredd/RFQuiltLayout 。看起来你可以使用这个
You can check out https://github.com/bryceredd/RFQuiltLayout . Looks like something you can use for this
这篇关于UICollectionView中不同单元格大小的自定义布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!