Get Width of last line of multiline UILabel

前端 未结 2 1588
旧巷少年郎
旧巷少年郎 2021-01-18 06:32

I have a dynamic multi line UILabel and need to know the end of the text (X Coordinate) of the visible text (not the Label) so I can show something after the text. Is this p

2条回答
  •  一生所求
    2021-01-18 07:17

    You'll be able to have more control over the text layout with the CoreText framework. Checkout the documentation:

    There are also some nice open source things that already do a lot of the hard work for you, like: https://github.com/Cocoanetics/DTCoreText

提交回复
热议问题