SquareFlowLayout 0.0.1

SquareFlowLayout 0.0.1

Taras Chernyshenko 维护。



SquareFlowLayout

Makes your UICollectionView to looks like Instagram explore has never been so easy before.

SquareFlowLayout provide dynamic layout generation by defining which IndexPath should be expanded.

Demo

安装

CocoaPods

即将推出!

手动方式

  1. 下载并拖动 Classes 文件夹到您的项目中。
  2. 恭喜!

使用

  1. SquareFlowLayout 设置到您的 UICollectionView 并设置它的 flowDelegate
    let flowLayout = SquareFlowLayout()
    flowLayout.flowDelegate = self
    self.collectionView.collectionViewLayout = flowLayout
  1. 使您的类符合 SquareFlowLayoutDelegate 并使用 shouldExpandItem(at: ) -> Bool 来决定哪些单元格将被展开
  2. 设计您的单元格
  3. 用数据填充您的 collectionView

为该项目做出贡献

如果你喜欢这个工具,请通过告诉我你是如何使用它的来支持我。

许可证

本代码遵循 MIT 许可证 的条款和条件。