How to limit the content in UITextView in ios

前端 未结 7 2256
迷失自我
迷失自我 2021-02-08 11:56

I want to load long text in TextViews of different Views. The text should be divided to pages when it reaches end of the textviews. And the next textview must start with the con

7条回答
  •  别跟我提以往
    2021-02-08 12:23

    You can create a CTFramesetter and call CTFramesetterSuggestFrameSizeWithConstraints. You will then find the range of text that fits within a given CGSize. Then manipulate the Text in accordance to the range and you are done.

    Reference - CoreText.

提交回复
热议问题