-
-
Save maninp/cf8cc5910e22f8f0b57c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (CGFloat) estimateHeight:(NSString *)content{ | |
NSAttributedString *bodyText = [NSAttributedString attributedStringWithMarkdownString:content font:MYCellFontDefine]; | |
CGRect rect = [bodyText boundingRectWithSize:CGSizeMake(CELL_WIDTH, FLT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading context:nil]; | |
return CGRectGetHeight(rect); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment