// // NYTimeRuleCell.m // jiaPei // // Created by Ning.ge on 2023/6/8. // Copyright © 2023 JCZ. All rights reserved. // #import "NYTimeRuleCell.h" @interface NYTimeRuleCell () @property (nonatomic, readwrite, strong) NYTimeRuleItemViewModel *viewModel; @end @implementation NYTimeRuleCell #pragma mark - PublicMethods + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath { static NSString *ID = @"NYTimeRuleCell"; [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID]; NYTimeRuleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath]; if (!cell) cell = [self rq_viewFromXib]; return cell; } - (void)bindViewModel:(NYTimeRuleItemViewModel *)viewModel { self.viewModel = viewModel; } #pragma mark - SystemMethods - (void)awakeFromNib { [super awakeFromNib]; self.contentView.backgroundColor = UIColorHex(0x498EF5); self.ruleOne.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor; self.ruleOne.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor; self.ruleTwo.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor; self.ruleTwo.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor; self.ruleThree.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor; self.ruleThree.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor; self.ruleFour.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor; self.ruleFour.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor; self.ruleMsg.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor; self.ruleMsg.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor; } @end