In a UITableViewCell I have three labels vertically aligned. The top and bottom labels are each a single line of text. The middle label I want to display up to two lines of text, but not more, and always be the same height...so even if it's just one line, it still takes up the space of two. How do I know how big to set the height of that middle label to so that it works with the font? I can't just make it 40 (double what a normal label is) because that doesn't account for line spacings and such.
Size a label based on font to exactly two lines
Have you tried UIFont properties such as lineHeight? I'm not sure if it is accurate but you can compare those number to what you get for label size if you have two lines of text and call sizeToFit.
The problem is "two lines of text" varies depending on the size of the font the person is using. My dad is going to get two lines long before I do since he has the fonts turned all the way up.