JXCategoryNumberView.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // JXCategoryNumberView.h
  3. // DQGuess
  4. //
  5. // Created by jiaxin on 2018/4/9.
  6. // Copyright © 2018年 jingbo. All rights reserved.
  7. //
  8. #import "JXCategoryTitleView.h"
  9. #import "JXCategoryNumberCell.h"
  10. #import "JXCategoryNumberCellModel.h"
  11. @interface JXCategoryNumberView : JXCategoryTitleView
  12. /**
  13. 需要与titles的count对应
  14. */
  15. @property (nonatomic, strong) NSArray <NSNumber *> *counts;
  16. /**
  17. 内部默认不会格式化数字,直接转成字符串显示。比如业务需要数字超过999显示999+,可以通过该block实现。
  18. */
  19. @property (nonatomic, copy) NSString *(^numberStringFormatterBlock)(NSInteger number);
  20. /**
  21. numberLabel的font,默认:[UIFont systemFontOfSize:11]
  22. */
  23. @property (nonatomic, strong) UIFont *numberLabelFont;
  24. /**
  25. 数字的背景色,默认:[UIColor colorWithRed:241/255.0 green:147/255.0 blue:95/255.0 alpha:1]
  26. */
  27. @property (nonatomic, strong) UIColor *numberBackgroundColor;
  28. /**
  29. 数字的title颜色,默认:[UIColor whiteColor]
  30. */
  31. @property (nonatomic, strong) UIColor *numberTitleColor;
  32. /**
  33. numberLabel的宽度补偿,label真实的宽度是文字内容的宽度加上补偿的宽度,默认:10
  34. */
  35. @property (nonatomic, assign) CGFloat numberLabelWidthIncrement;
  36. /**
  37. numberLabel的高度,默认:14
  38. */
  39. @property (nonatomic, assign) CGFloat numberLabelHeight;
  40. /**
  41. numberLabel x,y方向的偏移 (+值:水平方向向右,竖直方向向下)
  42. */
  43. @property (nonatomic, assign) CGPoint numberLabelOffset;
  44. @end