JXCategoryViewDefines.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // JXCategoryViewDefines.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. static const CGFloat JXCategoryViewAutomaticDimension = -1;
  11. typedef void(^JXCategoryCellSelectedAnimationBlock)(CGFloat percent);
  12. typedef NS_ENUM(NSUInteger, JXCategoryComponentPosition) {
  13. JXCategoryComponentPosition_Bottom,
  14. JXCategoryComponentPosition_Top,
  15. };
  16. // cell被选中的类型
  17. typedef NS_ENUM(NSUInteger, JXCategoryCellSelectedType) {
  18. JXCategoryCellSelectedTypeUnknown, //未知,不是选中(cellForRow方法里面、两个cell过渡时)
  19. JXCategoryCellSelectedTypeClick, //点击选中
  20. JXCategoryCellSelectedTypeCode, //调用方法`- (void)selectItemAtIndex:(NSInteger)index`选中
  21. JXCategoryCellSelectedTypeScroll //通过滚动到某个cell选中
  22. };
  23. typedef NS_ENUM(NSUInteger, JXCategoryTitleLabelAnchorPointStyle) {
  24. JXCategoryTitleLabelAnchorPointStyleCenter,
  25. JXCategoryTitleLabelAnchorPointStyleTop,
  26. JXCategoryTitleLabelAnchorPointStyleBottom,
  27. };
  28. typedef NS_ENUM(NSUInteger, JXCategoryIndicatorScrollStyle) {
  29. JXCategoryIndicatorScrollStyleSimple, //简单滚动,即从当前位置过渡到目标位置
  30. JXCategoryIndicatorScrollStyleSameAsUserScroll, //和用户左右滚动列表时的效果一样
  31. };
  32. #define JXCategoryViewDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)