I have a bunch of UILabels in a scrollview. I just replaced them with these, how do i get the height of the text?
This works for normal labels:
static CGFloat getLabelHeight(MTLabel *label, CGFloat width)
{
CGSize size = [[label text] sizeWithFont: [label font]
constrainedToSize: CGSizeMake(width,CGFLOAT_MAX)
lineBreakMode: UILineBreakModeWordWrap];
return size.height;
}
I have a bunch of UILabels in a scrollview. I just replaced them with these, how do i get the height of the text?
This works for normal labels: