酷店

XLPageTitleCell.h 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // XLPageTitleCell.h
  3. // XLPageViewControllerExample
  4. //
  5. // Created by MengXianLiang on 2019/5/13.
  6. // Copyright © 2019 jwzt. All rights reserved.
  7. // https://github.com/mengxianliang/XLPageViewController
  8. // 标题cell
  9. #import <UIKit/UIKit.h>
  10. #import "XLPageViewControllerConfig.h"
  11. #import "XLPageViewControllerUtil.h"
  12. //动画类行,已选cell/将要成为已选的cell
  13. typedef NS_ENUM (NSInteger ,XLPageTitleCellAnimationType) {
  14. XLPageTitleCellAnimationTypeSelected = 0,
  15. XLPageTitleCellAnimationTypeWillSelected = 1,
  16. };
  17. NS_ASSUME_NONNULL_BEGIN
  18. @interface XLPageTitleCell : UICollectionViewCell
  19. //配置信息 默认样式时用到
  20. @property (nonatomic, strong) XLPageViewControllerConfig *config;
  21. //标题label
  22. @property (nonatomic, strong) UILabel *textLabel;
  23. //配置cell
  24. /**
  25. 配置cell选中/未选中UI
  26. @param selected 已选中/未选中
  27. */
  28. - (void)configCellOfSelected:(BOOL)selected;
  29. /**
  30. 执行动画方法,默认样式中有标题颜色过渡的方法,用户如需添加其他动画,可在此方法中添加
  31. @param progress 动画进度 0~1
  32. @param type cell类行,已选中cell/将要选中cell
  33. */
  34. - (void)showAnimationOfProgress:(CGFloat)progress type:(XLPageTitleCellAnimationType)type;
  35. @end
  36. NS_ASSUME_NONNULL_END