【问题标题】:UICollectionViewLayout that fills cells from the center to the sides, in one rowUICollectionViewLayout 将单元格从中心填充到两侧,在一行中
【发布时间】:2018-10-01 17:03:05
【问题描述】:

我要制作的UICollectionView 应该只有一行,并且应该像这样填充:

1 element:         i  
2 elements:      i1 i2  
3 elements:    i3 i1 i2  
4 elements:   i3 i1 i2 i4  

等等。

我认为我应该继承UICollectionViewLayout,因为UICollectionViewFlowLayout 只填充一个方向。

知道如何实现这一点吗?

【问题讨论】:

    标签: ios uicollectionview uicollectionviewlayout


    【解决方案1】:

    是的 UICollectionViewLayout 以网格方式放置单元格。 如果你喜欢它的行为不同,你当然需要自定义布局。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-12
      • 2014-06-19
      • 1970-01-01
      相关资源
      最近更新 更多