// // NYFailSpecialExerciseCell.m // jiaPei // // Created by Ning.ge on 2024/12/11. // Copyright © 2024 JCZ. All rights reserved. // #import "NYFailSpecialExerciseCell.h" @interface NYFailSpecialExerciseCell () @property (nonatomic, readwrite, strong) NYFailSpecialExerciseItemModel *viewModel; @end @implementation NYFailSpecialExerciseCell #pragma mark - PublicMethods + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath { static NSString *ID = @"NYFailSpecialExerciseCell"; [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID]; NYFailSpecialExerciseCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath]; if (!cell) cell = [self rq_viewFromXib]; return cell; } - (void)bindViewModel:(NYFailSpecialExerciseItemModel *)viewModel { self.viewModel = viewModel; self.icon_imageView.image = [UIImage imageNamed:viewModel.icon]; RAC(self.title_label, text) = [[RACObserve(viewModel, title) deliverOnMainThread] takeUntil:self.rac_prepareForReuseSignal]; } #pragma mark - SystemMethods - (void)awakeFromNib { [super awakeFromNib]; } @end