MMRichTitleModel.m 624 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // MMRichTitleModel.m
  3. // RichTextEditDemo
  4. //
  5. // Created by aron on 2017/7/21.
  6. // Copyright © 2017年 aron. All rights reserved.
  7. //
  8. #import "MMRichTitleModel.h"
  9. #import "UtilMacro.h"
  10. @implementation MMRichTitleModel
  11. - (instancetype)init
  12. {
  13. self = [super init];
  14. if (self) {
  15. // TextHeight + separatorHeight
  16. _extraContentHeight = convertLength(7.5);
  17. _titleContentHeight = convertLength(58);
  18. _textContent = @"";
  19. self.richContentType = MMRichContentTypeTitle;
  20. }
  21. return self;
  22. }
  23. - (CGFloat)cellHeight {
  24. return _extraContentHeight + _titleContentHeight;
  25. }
  26. @end