Created
October 14, 2013 08:17
-
-
Save flashlib/6972544 to your computer and use it in GitHub Desktop.
This file contains hidden or 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)heightOfComment:(NSString *)comment { | |
UILabel *label = PrototypeCell.commentLabel; | |
// NOTE: The height of the comment should always be at least the height of | |
// one line of text. | |
if (comment.length == 0) | |
comment = @" "; | |
return [comment sizeWithFont:label.font | |
constrainedToSize:label.frame.size | |
lineBreakMode:label.lineBreakMode].height; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment