1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// AssessmentTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 2016/12/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "AssessmentTableViewCell.h"
@implementation AssessmentTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
self.titleNumberButton.layer.borderWidth = 1.0f;
self.titleNumberButton.layer.borderColor = [UIColor grayColor].CGColor;
}
- (void)setStudyEntity:(CustomTOStudyTopicOptionEntity *)studyEntity
{
_studyEntity = studyEntity;
if (_studyEntity) {
self.answerTitleLabel.text = _studyEntity.name;
self.answerTitleLabel.height = _studyEntity.answerHeight-30;
[self.titleNumberButton setTitle:_studyEntity.value forState:UIControlStateNormal];
self.titleNumberButton.selected = _studyEntity.isSelected;
self.titleNumberButton.backgroundColor = _studyEntity.isSelected?kMainBlueColor:[UIColor whiteColor];
}
}
- (void)setEmigratedEntity:(CustomTOPassLevelTopicOptionEntity *)emigratedEntity
{
_emigratedEntity = emigratedEntity;
if (_emigratedEntity) {
self.answerTitleLabel.text = _emigratedEntity.name;
self.answerTitleLabel.height = _emigratedEntity.answerHeight-30;
[self.titleNumberButton setTitle:_emigratedEntity.value forState:UIControlStateNormal];
self.titleNumberButton.selected = _emigratedEntity.isSelected;
self.titleNumberButton.backgroundColor = _emigratedEntity.isSelected?kMainBlueColor:[UIColor whiteColor];
}
}
@end