سؤال

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

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top