ZBFancyCollectionView 1.2.4

ZBFancyCollectionView 1.2.4

xzb 维护。



ZBFancyCollectionView

CI Status Version License Platform

示例

    self.collectionView = [UICollectionView fancyLayoutWithStyle:self.style];
    if (self.style == ZBFancyCollectionViewStyleCustom) {
        self.collectionView.fancyLayout.hoverIndexPath = [NSIndexPath indexPathForItem:0 inSection:0];
    }
    self.view.backgroundColor = self.collectionView.backgroundColor = [UIColor blackColor];
    [self.view addSubview:self.collectionView];
    [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        if (@available(iOS 11.0, *)) {
            make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(0);
            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(0);
        } else {
            make.top.bottom.offset(0);
        }
        make.left.right.offset(0);
    }];
    __weak typeof(self) weakSelf = self;
    
    //register
    [self.collectionView zb_configTableView:^(ZBCollectionProtoFactory *config) {
        __strong typeof(weakSelf) strongSelf = weakSelf;
        [strongSelf makerConfig:config];
    }];
    //data
    [self.collectionView zb_setup:^(ZBCollectionMaker *maker) {
        __strong typeof(weakSelf) strongSelf = weakSelf;
        [strongSelf makerExample:maker];
    }];

要求

安装

ZBFancyCollectionView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod 'ZBFancyCollectionView'

作者

[email protected], [email protected]

许可协议

ZBFancyCollectionView 可以在MIT许可下使用。更多信息请参阅LICENSE文件。