RQVipProblemNewCell.m 1.4 KB

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