酷店

KDPOrderTitleCell.m 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // KDPOrderTitleCell.m
  3. // KuDianProject
  4. //
  5. // Created by 学丽 on 2019/7/12.
  6. // Copyright © 2019 KDP. All rights reserved.
  7. //
  8. #import "KDPOrderTitleCell.h"
  9. @implementation KDPOrderTitleCell
  10. -(instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self=[super initWithFrame:frame];
  13. if (self) {
  14. self.textLabel.hidden = true;
  15. self.numLabel =[[UILabel alloc]initWithFrame:CGRectMake(0, 10, self.width, 20)];
  16. self.numLabel.textColor=[UIColor colorWithHexString:fontColor];
  17. self.numLabel.font=[UIFont systemFontOfSize:14];
  18. self.numLabel.textAlignment=NSTextAlignmentCenter;
  19. [self addSubview:self.numLabel];
  20. self.titlelabel =[[UILabel alloc]initWithFrame:CGRectMake(0, 35, self.width, 25)];
  21. self.titlelabel.font=[UIFont systemFontOfSize:14];
  22. self.titlelabel.textColor=[UIColor colorWithHexString:fontColor];
  23. self.titlelabel.textAlignment=NSTextAlignmentCenter;
  24. [self addSubview:self.titlelabel];
  25. UIImageView *lineV=[[UIImageView alloc]initWithFrame:CGRectMake(0, self.height-5, self.width, 5)];
  26. lineV.backgroundColor=[UIColor colorWithHexString:LineColor];
  27. [self addSubview:lineV];
  28. }
  29. return self;
  30. }
  31. //通过此父类方法配置cell是否被选中
  32. - (void)configCellOfSelected:(BOOL)selected {
  33. UIColor *textColor = selected ? [UIColor colorWithHexString:ThemeColor] : [UIColor colorWithHexString:fontColor];
  34. self.titlelabel.textColor = textColor;
  35. self.numLabel.textColor = textColor;
  36. }
  37. //通过此父类方法配置cell动画
  38. - (void)showAnimationOfProgress:(CGFloat)progress type:(XLPageTitleCellAnimationType)type {
  39. }
  40. @end