JXCategoryIndicatorProtocol.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // JXCategoryIndicatorProtocol.h
  3. // JXCategoryView
  4. //
  5. // Created by jiaxin on 2018/8/17.
  6. // Copyright © 2018年 jiaxin. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "JXCategoryViewDefines.h"
  11. #import "JXCategoryIndicatorParamsModel.h"
  12. @protocol JXCategoryIndicatorProtocol <NSObject>
  13. /**
  14. categoryView 重置状态时调用
  15. param selectedIndex 当前选中的 index
  16. param selectedCellFrame 当前选中的 cellFrame
  17. @param model 数据模型
  18. */
  19. - (void)jx_refreshState:(JXCategoryIndicatorParamsModel *)model;
  20. /**
  21. contentScrollView在进行手势滑动时,处理指示器跟随手势变化UI逻辑;
  22. param selectedIndex 当前选中的index
  23. param leftIndex 正在过渡中的两个cell,相对位置在左边的cell的index
  24. param leftCellFrame 正在过渡中的两个cell,相对位置在左边的cell的frame
  25. param rightIndex 正在过渡中的两个cell,相对位置在右边的cell的index
  26. param rightCellFrame 正在过渡中的两个cell,相对位置在右边的cell的frame
  27. param percent 过渡百分比
  28. @param model 数据模型
  29. */
  30. - (void)jx_contentScrollViewDidScroll:(JXCategoryIndicatorParamsModel *)model;
  31. /**
  32. 选中了某一个cell
  33. param lastSelectedIndex 之前选中的index
  34. param selectedIndex 选中的index
  35. param selectedCellFrame 选中的cellFrame
  36. param selectedType cell被选中类型
  37. @param model 数据模型
  38. */
  39. - (void)jx_selectedCell:(JXCategoryIndicatorParamsModel *)model;
  40. @end