1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // RQErrorAndCollectCell.m
- // jiaPei
- //
- // Created by 张嵘 on 2022/8/4.
- // Copyright © 2022 JCZ. All rights reserved.
- //
- #import "RQErrorAndCollectCell.h"
- @interface RQErrorAndCollectCell ()
- @property (nonatomic, readwrite, strong) RQErrorAndCollectItemViewModel *viewModel;
- @property (weak, nonatomic) IBOutlet UILabel *numLabel;
- @property (weak, nonatomic) IBOutlet UILabel *countNumLabel;
- @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
- @end
- @implementation RQErrorAndCollectCell
- #pragma mark - PublicMethods
- + (instancetype)cellWithTableView:(UITableView *)tableView {
- static NSString *ID = @"RQErrorAndCollectCell";
- RQErrorAndCollectCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
- if (!cell) {
- cell = [self rq_viewFromXib];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- }
- return cell;
- }
- - (void)bindViewModel:(RQErrorAndCollectItemViewModel *)viewModel {
- _viewModel = viewModel;
- _numLabel.text = viewModel.numStr;
- _titleLabel.text = viewModel.titleStr;
- _countNumLabel.text = viewModel.countStr;
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- _numLabel.layer.cornerRadius = RQ_FIT_HORIZONTAL(28.f) / 2.f;
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|