-(CGFloat)cellHeightWithString:(NSString *)string {
NSStringDrawingOptions options =NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading;
NSDictionary *attribute = @{NSFontAttributeName: [UIFont systemFontOfSize:14.0]};
CGSize contentSize = [string boundingRectWithSize:CGSizeMake(220.0, 9999.0) options:options attributes:attribute context:nil].size;
CGFloat contentHeight = contentSize.height;
return contentHeight;
}
网友评论