// // StuExamListCell.m // LN_School // // Created by EchoShacolee on 2017/6/25. // Copyright © 2017年 Danson. All rights reserved. // #import "StuExamListCell.h" @implementation StuExamListCell +(instancetype)cellForTableView:(UITableView *)tableView{ StuExamListCell * cell = [tableView dequeueReusableCellWithIdentifier:@"StuExamListCell"]; if (!cell) { cell = [[[NSBundle mainBundle] loadNibNamed:@"StuExamListCell" owner:nil options:nil] lastObject]; } return cell; } -(void)setDic:(NSDictionary *)dic{ _dic = dic; _name.text = dic[@"EI_USERNAME"]; _name.textColor = RQMianColor; NSString * sujectStr = [NSString stringWithFormat:@"%@",dic[@"EI_KSKM"]]; NSString *str = @""; switch ([sujectStr integerValue]) { case 1: str = @"科目一"; break; case 2: str = @"科目二"; break; case 3: str = @"科目三"; break; case 4: str = @"科目四"; break; default: break; } _subject.text = [NSString stringWithFormat:@"%@",str];//考试科目: _score.text = [NSString stringWithFormat:@"%@分",dic[@"EI_SCORE"]];//分数: _start.text = [NSString stringWithFormat:@"开始时间:%@",dic[@"EI_STARTDATE"]]; _end.text = [NSString stringWithFormat:@"结束时间:%@",dic[@"EI_ENDDATE"]]; _sfzh.text = [NSString stringWithFormat:@"身份证号:%@",dic[@"EI_USERSFZHM"]]; } - (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