// // SignViewCell.m // 千模 // // Created by MUMEI on 2018/5/31. // Copyright © 2018年 MUMEI. All rights reserved. // #import "SignViewCell.h" #import "UILabel+LabelHeightAndWidth.h" @implementation SignViewCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } - (void)setModel:(ActivityModel *)model{ _model = model; NSLog(@"model=====%@",model); [self setDetail]; NSLog(@"beg=====%@",model.beg); self.beg.text = model.beg; self.intro.text = model.intro; self.term.text = model.term; self.sendt.text = model.sendt; self.captionLabel.text = model.caption; } #pragma mark - labelTwo SizeToFitHeight - (void)setDetail { self.intro.text = _model.intro; self.intro.font = [UIFont systemFontOfSize:15]; CGFloat height = [UILabel getHeightByWidth:self.intro.frame.size.width title:self.intro.text font:self.intro.font]; if (height>450) { height = 450; } self.introHeight.constant = height; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end