1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // RQVipProblemNewCell.m
- // jiaPei
- //
- // Created by 张嵘 on 2022/10/12.
- // Copyright © 2022 JCZ. All rights reserved.
- //
- #import "RQVipProblemNewCell.h"
- @interface RQVipProblemNewCell ()
- @property (nonatomic, readwrite, strong) RQVipProblemItemViewModel *viewModel;
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *toTopConstant;
- @end
- @implementation RQVipProblemNewCell
- #pragma mark - PublicMethods
- + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
- static NSString *ID = @"RQVipProblemNewCell";
- [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
- RQVipProblemNewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
- if (!cell) cell = [self rq_viewFromXib];
- // [cell borderColor:RQColorFromHexString(@"#E0B279") width:1 cornorRadius:5];
-
- return cell;
- }
- - (void)bindViewModel:(RQVipProblemItemViewModel *)viewModel {
- // @weakify(self)
- _viewModel = viewModel;
- }
- - (void)setIndexPath:(NSIndexPath *)indexPath rowsInSection:(NSInteger)rows {
- // self.backgroundColor = RQColorFromHexString(@"#252531");
- }
- #pragma mark - SystemMethods
- - (void)awakeFromNib {
- [super awakeFromNib];
- self.toTopConstant.constant = RQ_FIT_HORIZONTAL(90.f);
- }
- #pragma mark - PrivateMethods
- @end
|