财神随手记账

HPSlideSegmentBackgroundView.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // HPSlideSegmentBackgroundView.h
  3. // HPSlideSegmentView
  4. //
  5. // Created by 何鹏 on 17/6/13.
  6. // Copyright © 2017年 何鹏. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "HPSlideSegmentView.h"
  10. #import "HPSlideModuleView.h"
  11. @class HPSlideSegmentBackgroundView;
  12. @protocol HPSlideSegmentBackgroundDataSource <NSObject>
  13. /**
  14. 数据源
  15. @return 数据源的个数
  16. */
  17. -(NSUInteger)hp_slideListWithCount;
  18. @end
  19. @interface HPSlideSegmentBackgroundView : UIView
  20. @property(nonatomic,weak) id<HPSlideSegmentBackgroundDataSource> dataSource;
  21. /**
  22. 滑块view
  23. */
  24. @property(nonatomic,strong) HPSlideModuleView *slideModuleView;
  25. /**
  26. 左右滑动的view
  27. */
  28. @property(nonatomic,strong) HPSlideSegmentView *slideSegmenView;
  29. /**
  30. Button显示的内容
  31. 一定要是NSString 不能为 Swift String
  32. */
  33. @property(nonatomic,weak) NSArray<NSString *> *contents;
  34. /**
  35. slideModuleView 的高度
  36. */
  37. @property(nonatomic,assign) CGFloat slideModuleViewHeight;
  38. /**
  39. 更新布局
  40. */
  41. -(void)updateLayout;
  42. /**
  43. 更新位置
  44. @param index 对应的位置
  45. */
  46. -(void)updateLayoutWithIndex:(NSUInteger)index;
  47. @end