How to adjust a label size to fit the length of the text

前端 未结 8 746
无人及你
无人及你 2020-12-20 12:27

I have searched the solution to this in the past QAs, but could not find the right one.
Does anyone know how to adjust aUILabel size dynamically to fit the

8条回答
  •  清歌不尽
    2020-12-20 12:55

    What you are searching is the UILabel method sizeToFit

    I can try to explain to you, but the best answer to know how to work with UILabel is that: https://stackoverflow.com/a/1054681/666479

提交回复
热议问题