Skip to content

那为啥不直接继承UICollectionViewFlowLayout呢? #212

@nattychao

Description

@nattychao

我自己写的继承于UICollectionViewFlowLayout,只需要增加columnCount一个属性,针对多组不同列,只需实现一个代理方法

  • (NSInteger)collectionView:(UICollectionView *)collectionView numberOfColumnsInSection:(NSInteger)section;
    而且还兼容了组头,组尾悬浮效果,使用起来和UICollectionViewFlowLayout一模一样
    把自己原来的列表换成瀑布流,甚至一行代码都不用写,非常好用

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions