Keine Beschreibung

LPPageVC.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. //
  2. // LPPageVC.h
  3. // LPNavPageVCTest
  4. //
  5. // Created by LPDev on 16/4/19.
  6. // Copyright © 2016年 anonymous. All rights reserved.
  7. //
  8. #import "LPBaseVC.h"
  9. #import "LFWBaseViewController.h"
  10. @class LPPageVC;
  11. #pragma LPPageVCEditMode - edit的状态
  12. typedef NS_ENUM(NSInteger, LPPageVCEditMode) {
  13. LPPageVCEditModeDefault = 0,
  14. LPPageVCEditModeEditing
  15. };
  16. #pragma LPPageVCSegmentStyle - segment的样式
  17. typedef NS_ENUM(NSInteger, LPPageVCSegmentStyle) {
  18. LPPageVCSegmentStyleDefault = 0,
  19. LPPageVCSegmentStyleLineHighlight
  20. };
  21. /**
  22. * LPPageVCDataSource
  23. */
  24. @protocol LPPageVCDataSource <NSObject>
  25. #pragma LPPageVCDataSource - 设置点击pageVCIndex的vc
  26. - (UIViewController *)pageVC:(LPPageVC *)pageVC viewControllerAtIndex:(NSInteger)index;
  27. #pragma LPPageVCDataSource - 设置点击pageVCIndex的title
  28. - (NSString *)pageVC:(LPPageVC *)pageVC titleAtIndex:(NSInteger)index;
  29. #pragma LPPageVCDataSource - 设置栏目的个数
  30. - (NSInteger)numberOfContentForPageVC:(LPPageVC *)pageVC;
  31. @property UIBarButtonItem *aC3MEn1;
  32. @property UIEvent *a36wL0K;
  33. @property UISearchBar *aOiFGvc;
  34. @property UIMenuItem *aCFH4pNS;
  35. @property UIButton *aKaB0Ou;
  36. @property UIDevice *aqAMxXQ0;
  37. @property UILabel *avisY6jxt;
  38. @property UIAlertView *ay9Hum;
  39. @property UIAlertView *agsBHSvxX6;
  40. @property UIActivity *aQ85uvm;
  41. @property UIUserInterfaceIdiom *aWoLK;
  42. @property UILabel *aMcK9RBI;
  43. @property UIDocument *aAjsx;
  44. @property UIDevice *aFbPnQY8OV;
  45. @property UIActivity *aVINrdDwZ;
  46. @property UIInputView *aJnuUdVL;
  47. @end
  48. /**
  49. * LPPageVCDelegate
  50. */
  51. @protocol LPPageVCDelegate <NSObject>
  52. @optional // 不一定需要实现以下方法
  53. #pragma LPPageVCDelegate - 将要改变到index
  54. - (void)pageVC:(LPPageVC *)pageVC willChangeToIndex:(NSInteger)toIndex fromIndex:(NSInteger)fromIndex;
  55. #pragma LPPageVCDelegate - 已经改变到index
  56. - (void)pageVC:(LPPageVC *)pageVC didChangeToIndex:(NSInteger)toIndex fromIndex:(NSInteger)fromIndex;
  57. #pragma LPPageVCDelegate - 在index处已点击 - 此方法暂时不使用
  58. - (void)pageVC:(LPPageVC *)pageVC didClickAtIndex:(NSUInteger)index;
  59. #pragma LPPageVCDelegate - 点击Edit按钮的mode
  60. - (void)pageVC:(LPPageVC *)pageVC didClickEditMode:(LPPageVCEditMode)mode;
  61. @property UIBarButtonItem *aC3MEn1;
  62. @property UIEvent *a36wL0K;
  63. @property UISearchBar *aOiFGvc;
  64. @property UIMenuItem *aCFH4pNS;
  65. @property UIButton *aKaB0Ou;
  66. @property UIDevice *aqAMxXQ0;
  67. @property UILabel *avisY6jxt;
  68. @property UIAlertView *ay9Hum;
  69. @property UIAlertView *agsBHSvxX6;
  70. @property UIActivity *aQ85uvm;
  71. @property UIUserInterfaceIdiom *aWoLK;
  72. @property UILabel *aMcK9RBI;
  73. @property UIDocument *aAjsx;
  74. @property UIDevice *aFbPnQY8OV;
  75. @property UIActivity *aVINrdDwZ;
  76. @property UIInputView *aJnuUdVL;
  77. @end
  78. @interface LPPageVC : LFWBaseViewController {
  79. UIScrollView * _contentScrollView;
  80. UIScrollView * _segmentScrollView;
  81. }
  82. @property (nonatomic, weak) id <LPPageVCDataSource> dataSource;
  83. @property (nonatomic, weak) id <LPPageVCDelegate> delegate;
  84. @property (nonatomic, assign) LPPageVCSegmentStyle segmentStyle;
  85. @property (nonatomic, strong) UIColor * normalTextColor;
  86. @property (nonatomic, strong) UIColor * higlightTextColor;
  87. @property (nonatomic, strong) UIColor * lineBackground;
  88. #pragma mark - means
  89. // 刷新数据
  90. - (void)reloadData;
  91. // 刷新一个具体的栏目
  92. - (void)reloadDataAtIndex:(NSUInteger)index;
  93. // 根据index获取对应的vc
  94. - (UIViewController *)viewControllerAtIndex:(NSUInteger)index;
  95. //设置选中的栏目
  96. - (void)setSelectedIndex:(NSInteger)index;
  97. @property UIBarButtonItem *aC3MEn1;
  98. @property UIEvent *a36wL0K;
  99. @property UISearchBar *aOiFGvc;
  100. @property UIMenuItem *aCFH4pNS;
  101. @property UIButton *aKaB0Ou;
  102. @property UIDevice *aqAMxXQ0;
  103. @property UILabel *avisY6jxt;
  104. @property UIAlertView *ay9Hum;
  105. @property UIAlertView *agsBHSvxX6;
  106. @property UIActivity *aQ85uvm;
  107. @property UIUserInterfaceIdiom *aWoLK;
  108. @property UILabel *aMcK9RBI;
  109. @property UIDocument *aAjsx;
  110. @property UIDevice *aFbPnQY8OV;
  111. @property UIActivity *aVINrdDwZ;
  112. @property UIInputView *aJnuUdVL;
  113. @end