CustomTOStudyTopicEntity.m 817 Bytes
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
//
//  CustomTOStudyTopicEntity.m
//  Lighting
//
//  Created by 曹云霄 on 2016/12/7.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "CustomTOStudyTopicEntity.h"

@implementation CustomTOStudyTopicEntity


- (CGFloat)titleHeight
{
    if (!_titleHeight) {
          NSString *type = [NSString stringWithFormat:@"[%@]",[BaseViewController returnTopicTypeTitle:self.topicType]];
         NSString *string = [NSString stringWithFormat:@"%ld、%@_____   %@",self.lineNo,self.title,type];
        _titleHeight = [self calculateStudyIntroductionHeight:string]+40;
    }
    return _titleHeight;
}

#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
27
    return [content heightWithWidth:ScreenWidth*2/3-28*2 andFont:15].height;
曹云霄's avatar
曹云霄 committed
28 29 30
}

@end