XLPageViewControllerConfig.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. //
  2. // XLPageViewControllerConfig.h
  3. // XLPageViewControllerExample
  4. //
  5. // Created by MengXianLiang on 2019/5/8.
  6. // Copyright © 2019 xianliang meng. 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. /**
  106. 标题栏显示位置 默认 XLPageTitleViewAlignmentLeft(只在标题总长度小于屏幕宽度时有效)
  107. */
  108. @property (nonatomic, assign) XLPageTitleViewAlignment titleViewAlignment;
  109. /**
  110. 标题栏样式 默认 XLPageTitleViewStyleBasic
  111. */
  112. @property (nonatomic, assign) XLPageTitleViewStyle titleViewStyle;
  113. /**
  114. 是否在NavigationBar上显示标题栏 默认NO
  115. */
  116. @property (nonatomic, assign) BOOL showTitleInNavigationBar;
  117. /**
  118. 隐藏底部阴影 默认 NO
  119. */
  120. @property (nonatomic, assign) BOOL shadowLineHidden;
  121. /**
  122. 阴影高度 默认 3.0f
  123. */
  124. @property (nonatomic, assign) CGFloat shadowLineHeight;
  125. /**
  126. 阴影宽度 默认 30.0f
  127. */
  128. @property (nonatomic, assign) CGFloat shadowLineWidth;
  129. /**
  130. 阴影颜色 默认 黑色
  131. */
  132. @property (nonatomic, strong) UIColor *shadowLineColor;
  133. /**
  134. 阴影末端形状 默认 XLPageShadowLineCapRound
  135. */
  136. @property (nonatomic, assign) XLPageShadowLineCap shadowLineCap;
  137. /**
  138. 默认动画效果 默认 XLPageShadowLineAnimationTypePan
  139. */
  140. @property (nonatomic, assign) XLPageShadowLineAnimationType shadowLineAnimationType;
  141. /**
  142. 阴影对齐 默认XLPageShadowLineAlignmentBottom
  143. */
  144. @property (nonatomic, assign) XLPageShadowLineAlignment shadowLineAlignment;
  145. /**
  146. 隐藏底部分割线 默认 NO
  147. */
  148. @property (nonatomic, assign) BOOL separatorLineHidden;
  149. /**
  150. 底部分割线高度 默认 0.5
  151. */
  152. @property (nonatomic, assign) CGFloat separatorLineHeight;
  153. /**
  154. 底部分割线颜色 默认 lightGrayColor
  155. */
  156. @property (nonatomic, strong) UIColor *separatorLineColor;
  157. /**
  158. 分段选择器颜色 默认 黑色
  159. */
  160. @property (nonatomic, strong) UIColor *segmentedTintColor;
  161. /**
  162. 默认初始化方法
  163. */
  164. + (XLPageViewControllerConfig *)defaultConfig;
  165. @end
  166. NS_ASSUME_NONNULL_END