1

I have a UILabel that can display up to 2 lines of text. I am not using Autolayout. In IB, I have set the "lines" property to 2. How can I get the number of displayed lines in Obj-C?

1 Answers1

0

In a gist: call the sizeWithFont: of the UILabel, and divide by lineHeight of the font.

daniel.gindi
  • 3,457
  • 1
  • 30
  • 36