流式布局

一个高性能的流式布局,提供全局头部、尾部、区块背景和多种配置。

查看 FlowLayoutDemo 示例项目。

变更日志

版本 2.0.0

FlowLayoutDelegate 具有全新的函数签名,所以请确保您已更新了您的所有实现以使用正确的签名,否则您的布局将无法正常工作。

新增

// Replaces `backgroundLayoutRegion(in:forSectionAt: Int) -> LayoutRegion`
func collectionView(_ collectionView: UICollectionView,
    layout: UICollectionViewLayout,
    regionForBackgroundInSection section: Int) -> LayoutRegion
    
// Replaces `backgroundLayoutInsets(in:forSectionAt: Int) -> UIEdgeInsets` 
func collectionView(_ collectionView: UICollectionView,
    layout: UICollectionViewLayout,
    insetsForBackgroundInSection section: Int) -> UIEdgeInsets
    
// Allows you to 'align' cells within a specified section
func collectionView(_ collectionView: UICollectionView,
    layout: UICollectionViewLayout,
    alignmentInSection section: Int) -> LayoutAlignment

已弃用

func backgroundLayoutRegion(in:forSectionAt: Int) -> LayoutRegion
func backgroundLayoutInsets(in:forSectionAt: Int) -> UIEdgeInsets