NYTimeStartRuleCell.m 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // NYTimeStartRuleCell.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2023/6/9.
  6. // Copyright © 2023 JCZ. All rights reserved.
  7. //
  8. #import "NYTimeStartRuleCell.h"
  9. @interface NYTimeStartRuleCell ()
  10. @property (nonatomic, readwrite, strong) NYTimeStartRuleViewModel *viewModel;
  11. @end
  12. @implementation NYTimeStartRuleCell
  13. #pragma mark - PublicMethods
  14. + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
  15. static NSString *ID = @"NYTimeStartRuleCell";
  16. [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
  17. NYTimeStartRuleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
  18. if (!cell) cell = [self rq_viewFromXib];
  19. return cell;
  20. }
  21. - (void)bindViewModel:(NYTimeStartRuleViewModel *)viewModel {
  22. self.viewModel = viewModel;
  23. }
  24. #pragma mark - SystemMethods
  25. - (void)awakeFromNib {
  26. [super awakeFromNib];
  27. self.contentView.backgroundColor = UIColorHex(0x498EF5);
  28. }
  29. @end