......
//文本自适应高度
CGRect plotRect = plotLabel.frame;
plotRect.size.height = [self summaryTextHeight:_movieDetailModel.plot_simple];
plotLabel.frame = plotRect;
}
//*********文本自适应高度*********
-(CGFloat)summaryTextHeight:(NSString *)text
{
NSDictionary *textDic = @{NSFontAttributeName: [UIFont systemFontOfSize:13.0]};
CGRect textRect = [text boundingRectWithSize:CGSizeMake(300, 10000000) options:NSStringDrawingUsesLineFragmentOrigin attributes:textDic context:nil];
return textRect.size.height;
}
//***********返回整个高度***********
-(CGFloat)scrollViewHeight:(MovieDetailModel *)movie
{
//固定高度+可变高度
return 230 + [self summaryTextHeight:movie.plot_simple];
}