SignViewCell.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // SignViewCell.m
  3. // 千模
  4. //
  5. // Created by MUMEI on 2018/5/31.
  6. // Copyright © 2018年 MUMEI. All rights reserved.
  7. //
  8. #import "SignViewCell.h"
  9. #import "UILabel+LabelHeightAndWidth.h"
  10. @implementation SignViewCell
  11. - (void)awakeFromNib {
  12. [super awakeFromNib];
  13. // Initialization code
  14. }
  15. - (void)setModel:(ActivityModel *)model{
  16. _model = model;
  17. NSLog(@"model=====%@",model);
  18. [self setDetail];
  19. NSLog(@"beg=====%@",model.beg);
  20. self.beg.text = model.beg;
  21. self.intro.text = model.intro;
  22. self.term.text = model.term;
  23. self.sendt.text = model.sendt;
  24. self.captionLabel.text = model.caption;
  25. }
  26. #pragma mark - labelTwo SizeToFitHeight
  27. - (void)setDetail
  28. {
  29. self.intro.text = _model.intro;
  30. self.intro.font = [UIFont systemFontOfSize:15];
  31. CGFloat height = [UILabel getHeightByWidth:self.intro.frame.size.width title:self.intro.text font:self.intro.font];
  32. if (height>450) {
  33. height = 450;
  34. }
  35. self.introHeight.constant = height;
  36. }
  37. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  38. [super setSelected:selected animated:animated];
  39. // Configure the view for the selected state
  40. }
  41. @end