RQVipAllFunctionCell.m 1.1 KB

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