+ (CGFloat)cellHeightWithContent:(NSString *)content{ CGSize size = [NSString sizeWithText:content andFont:JZGFont(ContentLabelFont) andMaxSize:CGSizeMake(ContentLabelWidth, MAXFLOAT)]; return size.height + 50.0f; }
NSS t ri n g (tool)
+ (CGSize)sizeWithText:(NSString *)text andFont:(UIFont *)font andMaxSize:(CGSize)maxSize { NSDictionary *attr = @{ NSFontAttributeName:font }; return [text boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attr context:nil].size; }