| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- //
- // RequirementdescriptionCell.m
- // jitao
- //
- // Created by 罗云飞 on 2017/12/16.
- // Copyright © 2017年 罗云飞. All rights reserved.
- //
- #import "RequirementdescriptionCell.h"
- @implementation RequirementdescriptionCell
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
-
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- UILabel *line1 = [UILabel new];
- line1.backgroundColor = NewRGBColor(235, 235, 235, 1);
- [self.contentView addSubview:line1];
-
- line1.sd_layout
- .topEqualToView(self.contentView)
- .leftEqualToView(self.contentView)
- .rightEqualToView(self.contentView)
- .heightIs(5);
-
- UILabel *line = [UILabel new];
- line.backgroundColor = NewButtonColor;
- ViewRadius(line, 1);
- [self.contentView addSubview:line];
-
- line.sd_layout
- .leftSpaceToView(self.contentView, 15)
- .topSpaceToView(line1, 15)
- .heightIs(18)
- .widthIs(3);
-
- _title = [UILabel new];
- _title.font = NewFont(14);
- [self.contentView addSubview:_title];
-
- _title.sd_layout
- .leftSpaceToView(self.contentView, 24)
- .heightIs(14)
- .rightSpaceToView(self.contentView, 15)
- .centerYEqualToView(line);
-
- UILabel *line2 = [UILabel new];
- line2.backgroundColor = NewLineGrayColor;
- [self.contentView addSubview:line2];
-
- line2.sd_layout
- .leftEqualToView(self.contentView)
- .rightEqualToView(self.contentView)
- .heightIs(0.8)
- .topSpaceToView(line1, 44);
-
- _content = [UILabel new];
- _content.font = NewFont(fitScreenWidth(13));
- _content.textColor = [UIColor colorWithString:@"#9A9A9A"];
- // _content.numberOfLines = 0;
- // _content.lineBreakMode = NSLineBreakByWordWrapping;
- [self.contentView addSubview:_content];
-
- _content.sd_layout
- .leftSpaceToView(self.contentView, 15)
- .rightSpaceToView(self.contentView, 15)
- .topSpaceToView(line2, 15)
- .autoHeightRatio(0);
-
- }
- return self;
- }
- - (void)assignment:(ResultsDetailsModel *)model {
- _content.text = model.introduction;
- }
- - (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
|