RQTimeRuleCell.m 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // RQTimeRuleCell.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/11/25.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import "RQTimeRuleCell.h"
  9. @interface RQTimeRuleCell ()
  10. @property (nonatomic, readwrite, strong) RQTimeRuleItemViewModel *viewModel;
  11. @end
  12. @implementation RQTimeRuleCell
  13. #pragma mark - PublicMethods
  14. + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
  15. static NSString *ID = @"RQTimeRuleCell";
  16. [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
  17. RQTimeRuleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
  18. if (!cell) cell = [self rq_viewFromXib];
  19. return cell;
  20. }
  21. - (void)bindViewModel:(RQTimeRuleItemViewModel *)viewModel {
  22. self.viewModel = viewModel;
  23. }
  24. #pragma mark - SystemMethods
  25. - (void)awakeFromNib {
  26. [super awakeFromNib];
  27. self.ruleOne.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  28. self.ruleOne.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  29. self.ruleTwo.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  30. self.ruleTwo.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  31. // self.ruleThree.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  32. // self.ruleThree.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  33. //
  34. // self.ruleFour.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  35. // self.ruleFour.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  36. //
  37. // self.ruleFive.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  38. // self.ruleFive.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  39. //
  40. // self.ruleSix.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  41. // self.ruleSix.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  42. //
  43. // self.ruleSeven.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  44. // self.ruleSeven.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  45. //
  46. // self.ruleEight.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
  47. // self.ruleEight.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
  48. }
  49. @end