RQVipProblemCell.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // RQVipProblemCell.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/9/19.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import "RQVipProblemCell.h"
  9. @interface RQVipProblemCell ()
  10. @property (nonatomic, readwrite, strong) RQVipProblemItemViewModel *viewModel;
  11. @end
  12. @implementation RQVipProblemCell
  13. #pragma mark - PublicMethods
  14. + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
  15. static NSString *ID = @"RQVipProblemCell";
  16. [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
  17. RQVipProblemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
  18. if (!cell) cell = [self rq_viewFromXib];
  19. [cell borderColor:RQColorFromHexString(@"#E0B279") width:1 cornorRadius:5];
  20. return cell;
  21. }
  22. - (void)bindViewModel:(RQVipProblemItemViewModel *)viewModel {
  23. // @weakify(self)
  24. _viewModel = viewModel;
  25. }
  26. - (void)setIndexPath:(NSIndexPath *)indexPath rowsInSection:(NSInteger)rows {
  27. self.backgroundColor = RQColorFromHexString(@"#252531");
  28. }
  29. #pragma mark - SystemMethods
  30. - (void)awakeFromNib {
  31. [super awakeFromNib];
  32. }
  33. #pragma mark - PrivateMethods
  34. @end