RAEditLabelCell.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // RAEditLabelCell.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/6/4.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RAEditLabelCell.h"
  9. #import "RAEditLabelModel.h"
  10. @interface RAEditLabelCell ()
  11. @property (strong, nonatomic) IBOutlet UILabel *titleLaebl;
  12. @property (strong, nonatomic) IBOutlet UITextView *valueLabel;
  13. @end
  14. @implementation RAEditLabelCell
  15. - (void)awakeFromNib {
  16. [super awakeFromNib];
  17. // Initialization code
  18. self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5);
  19. self.model = nil;
  20. }
  21. - (void)prepareForReuse {
  22. [super prepareForReuse];
  23. self.model = nil;
  24. }
  25. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  26. [super setSelected:selected animated:animated];
  27. // Configure the view for the selected state
  28. }
  29. - (void)setModel:(RAEditLabelModel *)model {
  30. _model = model;
  31. self.titleLaebl.text = _model.title;
  32. self.valueLabel.text = _model.value;
  33. if (model.detectTel) {
  34. self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
  35. } else {
  36. self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone;
  37. }
  38. }
  39. @end