123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // RQSimulationResultsListCell.m
- // SDJK
- //
- // Created by 张嵘 on 2021/8/11.
- //
- #import "RQSimulationResultsListCell.h"
- @interface RQSimulationResultsListCell ()
- @property (nonatomic, readwrite, strong) RQSimulationResultsListItemViewModel *viewModel;
- @property (weak, nonatomic) IBOutlet UILabel *carTypeLabel;
- @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
- @property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
- @property (weak, nonatomic) IBOutlet UILabel *dateLabel;
- @end
- @implementation RQSimulationResultsListCell
- #pragma mark - PublicMethods
- + (instancetype)cellWithTableView:(UITableView *)tableView {
- static NSString *ID = @"RQSimulationResultsListCell";
- RQSimulationResultsListCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
- if (!cell) {
- cell = [self rq_viewFromXib];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- }
- return cell;
- }
- - (void)bindViewModel:(RQSimulationResultsListItemViewModel *)viewModel {
- _viewModel = viewModel;
- self.carTypeLabel.text = viewModel.scoreRecordModel.type;
- self.subjectLabel.text = viewModel.scoreRecordModel.kskm;
- self.scoreLabel.text = [NSString stringWithFormat:@"%ld",viewModel.scoreRecordModel.score];
- self.dateLabel.text = viewModel.scoreRecordModel.createTime;
- }
- #pragma mark - SystemMethods
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|