YMEmptyView.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. //
  2. // YMEmptyView.h
  3. // MSYOUPAI
  4. //
  5. // Created by YoMi on 2023/11/6.
  6. //
  7. #import "YMEmptyBaseView.h"
  8. #import "UIView+YMEmpty.h"
  9. @interface YMEmptyView : YMEmptyBaseView
  10. /**
  11. 是否自动显隐EmptyView, default=YES
  12. */
  13. @property (nonatomic, assign) BOOL autoShowEmptyView;
  14. /**
  15. 占位图是否完全覆盖父视图, default=NO
  16. 当设置为YES后,占位图的backgroundColor默认为浅白色,可自行设置
  17. */
  18. @property (nonatomic, assign) BOOL emptyViewIsCompleteCoverSuperView;
  19. /**
  20. 内容物上每个子控件之间的间距 default is 20.f , 这是统一设置的,每个子控件可单独设置
  21. */
  22. @property (nonatomic, assign) CGFloat subViewMargin;
  23. /**
  24. 内容物-垂直方向偏移 (此属性与contentViewY 互斥,只有一个会有效)
  25. */
  26. @property (nonatomic, assign) CGFloat contentViewOffset;
  27. /**
  28. 内容物-Y坐标 (此属性与contentViewOffset 互斥,只有一个会有效)
  29. */
  30. @property (nonatomic, assign) CGFloat contentViewY;
  31. /**
  32. 是否忽略scrollView的contentInset
  33. */
  34. @property (nonatomic, assign) BOOL ignoreContentInset;
  35. //-------------------------- image --------------------------//
  36. /**
  37. 图片可设置固定大小 (default=图片实际大小)
  38. */
  39. @property (nonatomic, assign) CGSize imageSize;
  40. //-------------------------- titleLab 相关 --------------------------//
  41. /**
  42. 标题字体, 大小default is 16.f
  43. */
  44. @property (nonatomic, strong) UIFont *titleLabFont;
  45. /**
  46. 标题文字颜色
  47. */
  48. @property (nonatomic, strong) UIColor *titleLabTextColor;
  49. /**
  50. 标题与图片之间的间距 default is @subViewMargin
  51. */
  52. @property (nonatomic, assign) CGFloat titleLabMargin;
  53. //-------------------------- detailLab 相关 --------------------------//
  54. /**
  55. 详细描述字体,大小default is 14.f
  56. */
  57. @property (nonatomic, strong) UIFont *detailLabFont;
  58. /**
  59. 详细描述最大行数, default is 2
  60. */
  61. @property (nonatomic, assign) NSInteger detailLabMaxLines;
  62. /**
  63. 详细描述文字颜色
  64. */
  65. @property (nonatomic, strong) UIColor *detailLabTextColor;
  66. /**
  67. 详细描述文字行间距
  68. */
  69. @property (nonatomic, assign) NSInteger detailLabLineSpacing;
  70. /**
  71. 详细描述 与 (标题或图片) 之间的间距 default is @subViewMargin
  72. */
  73. @property (nonatomic, assign) CGFloat detailLabMargin;
  74. //-------------------------- Button 相关 --------------------------//
  75. /**
  76. 按钮字体, 大小default is 14.f
  77. */
  78. @property (nonatomic, strong) UIFont *actionBtnFont;
  79. /**
  80. 按钮的高度, default is 40.f
  81. */
  82. @property (nonatomic, assign) CGFloat actionBtnHeight;
  83. /**
  84. 按钮的宽度, default is 0.f, (此属性和actionBtnHorizontalMargin只有一个有效,都>0时,此属性优先级大)
  85. */
  86. @property (nonatomic, assign) CGFloat actionBtnWidth;
  87. /**
  88. 按钮的水平方向内边距, default is 30.f, (此属性和actionBtnWidth只有一个有效,都>0时,此属性优先级小)
  89. */
  90. @property (nonatomic, assign) CGFloat actionBtnHorizontalMargin;
  91. /**
  92. 按钮的圆角大小, default is 0
  93. */
  94. @property (nonatomic, assign) CGFloat actionBtnCornerRadius;
  95. /**
  96. 按钮边框border的宽度, default is 0
  97. */
  98. @property (nonatomic, assign) CGFloat actionBtnBorderWidth;
  99. /**
  100. 按钮边框颜色
  101. */
  102. @property (nonatomic, strong) UIColor *actionBtnBorderColor;
  103. /**
  104. 按钮文字颜色
  105. */
  106. @property (nonatomic, strong) UIColor *actionBtnTitleColor;
  107. /**
  108. 按钮背景颜色
  109. */
  110. @property (nonatomic, strong) UIColor *actionBtnBackGroundColor;
  111. /**
  112. 按钮背景渐变颜色集合,2个
  113. */
  114. @property (nonatomic, strong) NSArray<UIColor *> *actionBtnBackGroundGradientColors;
  115. /**
  116. 按钮 与 (详细描述或标题或图片) 之间的间距 default is @subViewMargin
  117. */
  118. @property (nonatomic, assign) CGFloat actionBtnMargin;
  119. @end