口袋优选

SGPageTitleViewConfigure.m 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. //
  2. // 如遇到问题或有更好方案,请通过以下方式进行联系
  3. // QQ群:429899752
  4. // Email:kingsic@126.com
  5. // GitHub:https://github.com/kingsic/SGPagingView
  6. //
  7. // SGPageTitleViewConfigure.m
  8. // SGPagingViewExample
  9. //
  10. // Created by kingsic on 2017/10/16.
  11. // Copyright © 2017年 kingsic. All rights reserved.
  12. //
  13. #import "SGPageTitleViewConfigure.h"
  14. @implementation SGPageTitleViewConfigure
  15. + (instancetype)pageTitleViewConfigure {
  16. return [[self alloc] init];
  17. }
  18. - (CGFloat)spacingBetweenButtons {
  19. if (_spacingBetweenButtons <= 0) {
  20. _spacingBetweenButtons = 20;
  21. }
  22. return _spacingBetweenButtons;
  23. }
  24. - (UIFont *)titleFont {
  25. if (!_titleFont) {
  26. _titleFont = [UIFont systemFontOfSize:15];
  27. }
  28. return _titleFont;
  29. }
  30. - (UIColor *)titleColor {
  31. if (!_titleColor) {
  32. _titleColor = [UIColor blackColor];
  33. }
  34. return _titleColor;
  35. }
  36. - (UIColor *)titleSelectedColor {
  37. if (!_titleSelectedColor) {
  38. _titleSelectedColor = [UIColor redColor];
  39. }
  40. return _titleSelectedColor;
  41. }
  42. - (CGFloat)indicatorHeight {
  43. if (_indicatorHeight <= 0) {
  44. _indicatorHeight = 2.0f;
  45. }
  46. return _indicatorHeight;
  47. }
  48. - (UIColor *)indicatorColor {
  49. if (!_indicatorColor) {
  50. _indicatorColor = [UIColor redColor];
  51. }
  52. return _indicatorColor;
  53. }
  54. - (CGFloat)indicatorAdditionalWidth {
  55. if (_indicatorAdditionalWidth <= 0) {
  56. _indicatorAdditionalWidth = 0;
  57. }
  58. return _indicatorAdditionalWidth;
  59. }
  60. - (CGFloat)indicatorAnimationTime {
  61. if (_indicatorAnimationTime <= 0) {
  62. _indicatorAnimationTime = 0.1;
  63. } else if (_indicatorAnimationTime > 0.3) {
  64. _indicatorAnimationTime = 0.3;
  65. }
  66. return _indicatorAnimationTime;
  67. }
  68. - (CGFloat)indicatorCornerRadius {
  69. if (_indicatorCornerRadius <= 0) {
  70. _indicatorCornerRadius = 0;
  71. }
  72. return _indicatorCornerRadius;
  73. }
  74. - (CGFloat)indicatorBorderWidth {
  75. if (_indicatorBorderWidth <= 0) {
  76. _indicatorBorderWidth = 0;
  77. }
  78. return _indicatorBorderWidth;
  79. }
  80. - (UIColor *)indicatorBorderColor {
  81. if (!_indicatorBorderColor) {
  82. _indicatorBorderColor = [UIColor clearColor];
  83. }
  84. return _indicatorBorderColor;
  85. }
  86. - (CGFloat)indicatorFixedWidth {
  87. if (_indicatorFixedWidth <= 0) {
  88. _indicatorFixedWidth = 20;
  89. }
  90. return _indicatorFixedWidth;
  91. }
  92. - (CGFloat)indicatorDynamicWidth {
  93. if (_indicatorDynamicWidth <= 0) {
  94. _indicatorDynamicWidth = 20;
  95. }
  96. return _indicatorDynamicWidth;
  97. }
  98. @end