Latest 0.0.4
Homepage https://github.com/ONECATYU/WSCollectionViewFlowLayout
License MIT
Platforms ios , requires ARC
Frameworks UIKit, Foundation
Authors

WSCollectionViewFlowLayout

  • 实现了UICollectionViewDelegateFlowLayout协议方法.使用形式和系统Flowlayout相同.
  • 支持多个section, 不同section标签流布局和固定有规则布局混合

使用

  • 您可以通过实现UICollectionViewDelegateFlowLayout协议方法,来设置cell/header/footer.
  • 也可以通过下面这种方式来设置

    WSCollectionViewFlowLayout *layout = [[WSCollectionViewFlowLayout alloc]init];
    layout.contentInset = UIEdgeInsetsMake(20, 8, 20, 8);
    layout.minimumLineSpacing = 8;
    layout.minimumInteritemSpacing = 8;
    layout.sectionInset = UIEdgeInsetsMake(8, 8, 8, 8);
    layout.itemSize = CGSizeMake(100, 100);
    layout.headerReferenceSize = CGSizeMake(CGRectGetWidth(self.view.frame) - 16, 40);
    layout.footerReferenceSize = CGSizeMake(CGRectGetWidth(self.view.frame) - 16, 40);
    
    UICollectionView *collectionView = [[UICollectionView alloc]initWithFrame:self.view.bounds collectionViewLayout:layout];
    collectionView.delegate = self;
    collectionView.dataSource = self;
    collectionView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:collectionView];

Latest podspec

{
    "name": "WSCollectionViewFlowLayout",
    "version": "0.0.4",
    "summary": "u53efu66ffu4ee3UICollectionViewFlowLayoutu7684u6807u7b7eu6d41u5e03u5c40.u5b9eu73b0u4e86UICollectionViewDelegateFlowLayoutu534fu8baeu65b9u6cd5.u4f7fu7528u5f62u5f0fu548cu7cfbu7edfFlowlayoutu76f8u540c.",
    "description": "* u4f7fu7528u7b80u5355,u548cu7cfbu7edfUICollectionViewFlowLayoutu65e0u7f1du5207u6362.n* u5b9eu73b0u4e86UICollectionViewDelegateFlowLayoutu534fu8baeu65b9u6cd5.u4f7fu7528u5f62u5f0fu548cu7cfbu7edfFlowlayoutu76f8u540c.n* u652fu6301u591au4e2asection, u4e0du540csectionu6807u7b7eu6d41u5e03u5c40u548cu56fau5b9au6709u89c4u5219u5e03u5c40u6df7u5408",
    "homepage": "https://github.com/ONECATYU/WSCollectionViewFlowLayout",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ONECATYU": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/ONECATYU/WSCollectionViewFlowLayout.git",
        "tag": "0.0.4"
    },
    "source_files": "Lib/**/*.{h,m}",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This