StudentListCell.m 947 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // StudentListCell.m
  3. // LNManager
  4. //
  5. // Created by apple on 2017/5/5.
  6. // Copyright © 2017年 lee. All rights reserved.
  7. //
  8. #import "StudentListCell.h"
  9. @implementation StudentListCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. -(void)setDataDic:(NSDictionary *)dataDic {
  15. _dataDic = dataDic;
  16. //赋值
  17. _nameLabel.text = dataDic[@"TSO_NAME"];
  18. _sexLabel.text = [dataDic[@"TSO_SEX"] integerValue] == 1 ? @"男":@"女";
  19. _carTypeLabel.text = dataDic[@"TSO_TRAINTYPE"];
  20. NSString *dateStr = dataDic[@"TSO_APPLYDATE"];//
  21. if (dateStr.length > 10) {
  22. NSRange range = {5,5};
  23. _dateLabel.text = [dateStr substringWithRange:range];
  24. }else{
  25. _dateLabel.text = dateStr;
  26. }
  27. }
  28. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  29. [super setSelected:selected animated:animated];
  30. // Configure the view for the selected state
  31. }
  32. @end