// // RADetailSingleLineCell.m // Apex And Drivers // // Created by Jack on 2018/6/2. // Copyright © 2018年 USAI. All rights reserved. // #import "RADetailSingleLineCell.h" #import "RADetailSingleLineModel.h" @interface RADetailSingleLineCell () @property (strong, nonatomic) IBOutlet UILabel *titleLable; @property (strong, nonatomic) IBOutlet UITextView *valueLabel; @end @implementation RADetailSingleLineCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5); } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } - (void)prepareForReuse { [super prepareForReuse]; self.model = nil; } - (void)setModel:(RADetailSingleLineModel *)model { _model = model; self.titleLable.text = _model.title; self.valueLabel.text = _model.value; if (_model.highlight) { self.valueLabel.textColor = [UIColor redColor]; } else{ self.valueLabel.textColor = [UIColor blackColor]; } if (model.detectTel) { self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber; } else { self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone; } } @end