两折买改口袋样式

WSLWaterFlowLayout.h 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // WSLWaterFlowLayout.h
  3. // collectionView
  4. //
  5. // Created by 王双龙 on 2017/10/16.
  6. // Copyright © 2017年 https://www.jianshu.com/u/e15d1f644bea All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef enum {
  10. WSLVerticalWaterFlow = 0, /** 竖向瀑布流 item等宽不等高 */
  11. WSLHorizontalWaterFlow = 1, /** 水平瀑布流 item等高不等宽 不支持头脚视图*/
  12. WSLVHWaterFlow = 2, /** 竖向瀑布流 item等高不等宽 */
  13. WSLLineWaterFlow = 3 /** 线性布局 待完成,敬请期待 */
  14. } WSLFlowLayoutStyle; //样式
  15. @class WSLWaterFlowLayout;
  16. @protocol WSLWaterFlowLayoutDelegate <NSObject>
  17. /** 竖向瀑布流 item等宽不等高 */
  18. -(CGFloat)waterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout heightForItemAtIndexPath:(NSIndexPath *)indexPath itemWidth:(CGFloat)itemWidth;
  19. /** 水平瀑布流 item等高不等宽 */
  20. -(CGFloat)waterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout widthForItemAtIndexPath:(NSIndexPath *)indexPath itemHeight:(CGFloat)itemHeight;
  21. /** 竖向瀑布流 item等高不等宽 列数、行数无用*/
  22. - (CGSize)waterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath;
  23. /** 头视图Size */
  24. -(CGSize )waterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout sizeForHeaderViewInSection:(NSInteger)section;
  25. /** 脚视图Size */
  26. -(CGSize )waterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout sizeForFooterViewInSection:(NSInteger)section;
  27. @optional //以下都有默认值
  28. /** 列数*/
  29. -(CGFloat)columnCountInWaterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout;
  30. /** 行数*/
  31. -(CGFloat)rowCountInWaterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout;
  32. /** 列间距*/
  33. -(CGFloat)columnMarginInWaterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout;
  34. /** 行间距*/
  35. -(CGFloat)rowMarginInWaterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout;
  36. /** 边缘之间的间距*/
  37. -(UIEdgeInsets)edgeInsetInWaterFlowLayout:(WSLWaterFlowLayout *)waterFlowLayout;
  38. @property UIControl *aft6lGs;
  39. @property UIRegion *aoTsGQSL1;
  40. @property UIImage *axKUf;
  41. @property UIEdgeInsets *aowpzeNXWcs;
  42. @property UIBarButtonItem *aNJeB;
  43. @property UIRegion *awUEvelmH;
  44. @property UILabel *aNE2x9;
  45. @property UIEvent *aZgp6nvWKUa;
  46. @property UIBarButtonItem *aQn2k;
  47. @property UIImageView *amlerqYV;
  48. @property UISwitch *aCI8h;
  49. @property UICollectionView *aujTUovRqOs;
  50. @property UIImage *aE3oUq1D;
  51. @end
  52. @interface WSLWaterFlowLayout : UICollectionViewLayout
  53. /** delegate*/
  54. @property (nonatomic, weak) id<WSLWaterFlowLayoutDelegate> delegate;
  55. /** 瀑布流样式*/
  56. @property (nonatomic, assign) WSLFlowLayoutStyle flowLayoutStyle;
  57. @property UIControl *aft6lGs;
  58. @property UIRegion *aoTsGQSL1;
  59. @property UIImage *axKUf;
  60. @property UIEdgeInsets *aowpzeNXWcs;
  61. @property UIBarButtonItem *aNJeB;
  62. @property UIRegion *awUEvelmH;
  63. @property UILabel *aNE2x9;
  64. @property UIEvent *aZgp6nvWKUa;
  65. @property UIBarButtonItem *aQn2k;
  66. @property UIImageView *amlerqYV;
  67. @property UISwitch *aCI8h;
  68. @property UICollectionView *aujTUovRqOs;
  69. @property UIImage *aE3oUq1D;
  70. @end