CGXVerticalMenuRoundFlowLayoutUtils.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // CGXVerticalMenuRoundFlowLayoutUtils.h
  3. // CGXVerticalMenuView-OC
  4. //
  5. // Created by CGX on 2018/05/01.
  6. // Copyright © 2019 CGX. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface CGXVerticalMenuRoundFlowLayoutUtils : NSObject
  11. /// 获取cell间距
  12. /// @param sectionIndex sectionIndex description
  13. + (CGFloat)evaluatedMinimumInteritemSpacingForSectionWithCollectionLayout:(UICollectionViewFlowLayout *)layout atIndex:(NSInteger)sectionIndex;
  14. /// 获取用户设置CollectionView 对应section的 sectionInset
  15. /// @param index index description
  16. + (UIEdgeInsets)evaluatedSectionInsetForItemWithCollectionLayout:(UICollectionViewFlowLayout *)layout atIndex:(NSInteger)index;
  17. #pragma mark - 不规则Cell计算方案
  18. /// 不规则cell找出top最高位置
  19. /// @param section section description
  20. /// @param numberOfItems numberOfItems description
  21. /// @param defaultFrame defaultFrame description
  22. + (CGRect)calculateIrregularitiesCellByMinTopFrameWithLayout:(UICollectionViewFlowLayout *)layout
  23. section:(NSInteger)section
  24. numberOfItems:(NSInteger)numberOfItems
  25. defaultFrame:(CGRect)defaultFrame;
  26. /// 不规则cell找出bootom最低位置
  27. /// @param layout layout description
  28. /// @param section section description
  29. /// @param numberOfItems numberOfItems description
  30. /// @param defaultFrame defaultFrame description
  31. + (CGRect)calculateIrregularitiesCellByMaxBottomFrameWithLayout:(UICollectionViewFlowLayout *)layout
  32. section:(NSInteger)section
  33. numberOfItems:(NSInteger)numberOfItems
  34. defaultFrame:(CGRect)defaultFrame;
  35. @end
  36. NS_ASSUME_NONNULL_END