酷店

XLPageViewControllerConfig.h 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. //
  2. // XLPageViewControllerConfig.h
  3. // XLPageViewControllerExample
  4. //
  5. // Created by MengXianLiang on 2019/5/8.
  6. // Copyright © 2019 jwzt. All rights reserved.
  7. // https://github.com/mengxianliang/XLPageViewController
  8. // 显示配置类
  9. #import <Foundation/Foundation.h>
  10. #import <UIKit/UIKit.h>
  11. /**
  12. 标题栏样式
  13. Basic 基本样式
  14. Segmented 分段样式
  15. */
  16. typedef NS_ENUM(NSInteger, XLPageTitleViewStyle) {
  17. XLPageTitleViewStyleBasic = 0,
  18. XLPageTitleViewStyleSegmented = 1
  19. };
  20. /**
  21. 标题对齐,居左,居中,局右
  22. */
  23. typedef NS_ENUM(NSInteger, XLPageTitleViewAlignment) {
  24. XLPageTitleViewAlignmentLeft = 0,
  25. XLPageTitleViewAlignmentCenter = 1,
  26. XLPageTitleViewAlignmentRight = 2,
  27. };
  28. /**
  29. 文字垂直对齐,居中,居上,局下
  30. */
  31. typedef NS_ENUM(NSInteger, XLPageTextVerticalAlignment) {
  32. XLPageTextVerticalAlignmentCenter = 0,
  33. XLPageTextVerticalAlignmentTop = 1,
  34. XLPageTextVerticalAlignmentBottom = 2,
  35. };
  36. /**
  37. 阴影末端形状,圆角、直角
  38. */
  39. typedef NS_ENUM(NSInteger, XLPageShadowLineCap) {
  40. XLPageShadowLineCapRound = 0,
  41. XLPageShadowLineCapSquare = 1,
  42. };
  43. /**
  44. 阴影对齐
  45. */
  46. typedef NS_ENUM(NSInteger, XLPageShadowLineAlignment) {
  47. XLPageShadowLineAlignmentBottom = 0,
  48. XLPageShadowLineAlignmentCenter = 1,
  49. XLPageShadowLineAlignmentTop = 2,
  50. };
  51. /**
  52. 阴影动画类型,平移、缩放、无动画
  53. */
  54. typedef NS_ENUM(NSInteger, XLPageShadowLineAnimationType) {
  55. XLPageShadowLineAnimationTypePan = 0,
  56. XLPageShadowLineAnimationTypeZoom = 1,
  57. XLPageShadowLineAnimationTypeNone = 2,
  58. };
  59. NS_ASSUME_NONNULL_BEGIN
  60. @interface XLPageViewControllerConfig : NSObject
  61. /**
  62. 标题正常颜色 默认 grayColor
  63. */
  64. @property (nonatomic, strong) UIColor *titleNormalColor;
  65. /**
  66. 标题选中颜色 默认 blackColor
  67. */
  68. @property (nonatomic, strong) UIColor *titleSelectedColor;
  69. /**
  70. 标题正常字体 默认 标准字体18
  71. */
  72. @property (nonatomic, strong) UIFont *titleNormalFont;
  73. /**
  74. 标题选中字体 默认 标准粗体18
  75. */
  76. @property (nonatomic, strong) UIFont *titleSelectedFont;
  77. /**
  78. 标题间距 默认 10
  79. */
  80. @property (nonatomic, assign) CGFloat titleSpace;
  81. /**
  82. 标题宽度 默认 文字长度
  83. */
  84. @property (nonatomic, assign) CGFloat titleWidth;
  85. /**
  86. 标题颜色过渡开关 默认 开
  87. */
  88. @property (nonatomic, assign) BOOL titleColorTransition;
  89. /**
  90. 文字垂直对齐 默认居中
  91. */
  92. @property (nonatomic, assign) XLPageTextVerticalAlignment textVerticalAlignment;
  93. /**
  94. 标题栏高度 默认 40
  95. */
  96. @property (nonatomic, assign) CGFloat titleViewHeight;
  97. /**
  98. 标题栏背景色 默认 透明
  99. */
  100. @property (nonatomic, strong) UIColor *titleViewBackgroundColor;
  101. /**
  102. 标题栏内容缩进 默认 UIEdgeInsetsMake(0, 10, 0, 10)
  103. */
  104. @property (nonatomic, assign) UIEdgeInsets titleViewInset;
  105. @property(nonatomic,assign)CGFloat navHeight;
  106. @property(nonatomic,assign)CGFloat contentHeight;
  107. /**
  108. 标题栏显示位置 默认 XLPageTitleViewAlignmentLeft(只在标题总长度小于屏幕宽度时有效)
  109. */
  110. @property (nonatomic, assign) XLPageTitleViewAlignment titleViewAlignment;
  111. /**
  112. 标题栏样式 默认 XLPageTitleViewStyleBasic
  113. */
  114. @property (nonatomic, assign) XLPageTitleViewStyle titleViewStyle;
  115. /**
  116. 是否在NavigationBar上显示标题栏 默认NO
  117. */
  118. @property (nonatomic, assign) BOOL showTitleInNavigationBar;
  119. /**
  120. 隐藏底部阴影 默认 NO
  121. */
  122. @property (nonatomic, assign) BOOL shadowLineHidden;
  123. /**
  124. 阴影高度 默认 3.0f
  125. */
  126. @property (nonatomic, assign) CGFloat shadowLineHeight;
  127. /**
  128. 阴影宽度 默认 30.0f
  129. */
  130. @property (nonatomic, assign) CGFloat shadowLineWidth;
  131. /**
  132. 阴影颜色 默认 黑色
  133. */
  134. @property (nonatomic, strong) UIColor *shadowLineColor;
  135. /**
  136. 阴影末端形状 默认 XLPageShadowLineCapRound
  137. */
  138. @property (nonatomic, assign) XLPageShadowLineCap shadowLineCap;
  139. /**
  140. 默认动画效果 默认 XLPageShadowLineAnimationTypePan
  141. */
  142. @property (nonatomic, assign) XLPageShadowLineAnimationType shadowLineAnimationType;
  143. /**
  144. 阴影对齐 默认XLPageShadowLineAlignmentBottom
  145. */
  146. @property (nonatomic, assign) XLPageShadowLineAlignment shadowLineAlignment;
  147. /**
  148. 隐藏底部分割线 默认 NO
  149. */
  150. @property (nonatomic, assign) BOOL separatorLineHidden;
  151. /**
  152. 底部分割线高度 默认 0.5
  153. */
  154. @property (nonatomic, assign) CGFloat separatorLineHeight;
  155. /**
  156. 底部分割线距离底下的间距
  157. */
  158. @property (nonatomic, assign) CGFloat separatorLineBottomMargin;
  159. /**
  160. 底部分割线颜色 默认 lightGrayColor
  161. */
  162. @property (nonatomic, strong) UIColor *separatorLineColor;
  163. /**
  164. 分段选择器颜色 默认 黑色
  165. */
  166. @property (nonatomic, strong) UIColor *segmentedTintColor;
  167. /**
  168. 默认初始化方法
  169. */
  170. + (XLPageViewControllerConfig *)defaultConfig;
  171. @end
  172. NS_ASSUME_NONNULL_END