123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // BYHLabelsLayout.h
- // UICollectionVIewDemo
- //
- // Created by 疯叶 on 2019/8/14.
- // Copyright © 2019 疯叶. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @protocol BYHLabelsLayoutDelegate;
- NS_ASSUME_NONNULL_BEGIN
- @interface BYHLabelsLayout : UICollectionViewLayout
- @property (nonatomic,weak) id<BYHLabelsLayoutDelegate> delegate;
- @end
- @protocol BYHLabelsLayoutDelegate <NSObject>
- @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
|