JXCategoryIndicatorParamsModel.h 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // JXCategoryIndicatorParamsModel.h
  3. // JXCategoryView
  4. //
  5. // Created by jiaxin on 2018/12/13.
  6. // Copyright © 2018 jiaxin. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "JXCategoryViewDefines.h"
  11. /**
  12. 指示器不同情况处理时传递的数据模型,不同情况会对不同的属性赋值,根据不同情况的 api 说明确认。
  13. FAQ: 为什么会通过 model 传递数据?
  14. 因为指示器处理逻辑以后会扩展不同的使用场景,会新增参数,如果不通过 model 传递,就会在 api 新增参数,一旦修改 api 改的地方就特别多了,而且会影响到之前自定义实现的开发者。
  15. */
  16. @interface JXCategoryIndicatorParamsModel : NSObject
  17. @property (nonatomic, assign) NSInteger selectedIndex; // 当前选中的 index
  18. @property (nonatomic, assign) CGRect selectedCellFrame; // 当前选中的 cellFrame
  19. @property (nonatomic, assign) NSInteger leftIndex; // 正在过渡中的两个 cell,相对位置在左边的 cell 的 index
  20. @property (nonatomic, assign) CGRect leftCellFrame; // 正在过渡中的两个 cell,相对位置在左边的 cell 的 frame
  21. @property (nonatomic, assign) NSInteger rightIndex; // 正在过渡中的两个 cell,相对位置在右边的 cell 的 index
  22. @property (nonatomic, assign) CGRect rightCellFrame; // 正在过渡中的两个 cell,相对位置在右边的 cell 的 frame
  23. @property (nonatomic, assign) CGFloat percent; // 正在过渡中的两个 cell,从左到右的百分比
  24. @property (nonatomic, assign) NSInteger lastSelectedIndex; // 之前选中的 index
  25. @property (nonatomic, assign) JXCategoryCellSelectedType selectedType; //cell 被选中类型
  26. @end