UILabel auto resize on basis of text to be shown

后端 未结 10 1892
余生分开走
余生分开走 2021-01-29 22:44

I\'m working on an application, in which I\'m required to autoresize the text area on basis of text to be displayed.

Firstly, I\'m not sure for this either I should use

10条回答
  •  失恋的感觉
    2021-01-29 23:24

    Please note that with autolayout call sizeToFit won't change size, because it will be changed later by autolayout calculations. In this case you need to setup proper height constraint for your UILabel with "height >= xx" value.

提交回复
热议问题