// // BYHLabelsLayout.h // UICollectionVIewDemo // // Created by 疯叶 on 2019/8/14. // Copyright © 2019 疯叶. All rights reserved. // #import @protocol BYHLabelsLayoutDelegate; NS_ASSUME_NONNULL_BEGIN @interface BYHLabelsLayout : UICollectionViewLayout @property (nonatomic,weak) id delegate; @end @protocol BYHLabelsLayoutDelegate @required - (CGSize)collectionView:(UICollectionView *)collectionView layout:(BYHLabelsLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath; @optional /** * 行间距 */ - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(BYHLabelsLayout *)layout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section; /** * 列间距 */ - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(BYHLabelsLayout *)layout minimumLineSpacingForSectionAtIndex:(NSInteger)section; /** * section边距 */ - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(BYHLabelsLayout *)layout insetForSectionAtIndex:(NSInteger)section; /** * 头部高度 */ - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(BYHLabelsLayout *)layout referenceHeightForHeaderInSection:(NSInteger)section; /** * 尾部高度 */ - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(BYHLabelsLayout *)layout referenceHeightForFooterInSection:(NSInteger)section; @end NS_ASSUME_NONNULL_END