0

I have dynamic text in a label with plenty of room around it. Since there is room, it would be great if the text could wrap in addition to autoshrinking.

enter image description here

pixelfairy
  • 1,479
  • 1
  • 15
  • 29

1 Answers1

1

You can apply any of these 2 solutions

1.Set numberOfLines To 0 and make larger height of your label then text automatically wrap.

2.you can dynamically calculate height of label on the basis of length of string with function sizeWithFont.

rahul
  • 178
  • 5
  • Thanks! I wouldn't have thought to set the number of lines to zero. But now that you point it out, I guess it was right in front of me. Works exactly like I need it to! – pixelfairy Feb 13 '14 at 17:22