We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1a1996 commit da12e47Copy full SHA for da12e47
1 file changed
Example/Classes/Views/PostTableViewCell.m
@@ -61,11 +61,8 @@ + (CGFloat)heightForCellWithPost:(Post *)post {
61
}
62
63
+ (CGFloat)detailTextHeight:(NSString *)text {
64
-#pragma clang diagnostic push
65
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
66
- CGSize sizeToFit = [text sizeWithFont:[UIFont systemFontOfSize:12.0f] constrainedToSize:CGSizeMake(240.0f, CGFLOAT_MAX) lineBreakMode:NSLineBreakByWordWrapping];
67
-#pragma clang diagnostic pop
68
- return sizeToFit.height;
+ CGRect rectToFit = [text boundingRectWithSize:CGSizeMake(240.0f, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12.0f]} context:nil];
+ return rectToFit.size.height;
69
70
71
#pragma mark - UIView
0 commit comments