How to limit the content in UITextView in ios

前端 未结 7 2254
迷失自我
迷失自我 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:36

    How about assigning the total text to all of the text views. Then when ever we are moving from one text to another text view we just use the below function of the text view.

    - (void)scrollRangeToVisible:(NSRange)range;
    

    You would be deciding what that range should be initially, and then keep on altering it for every iteration until you reach end of string.

提交回复
热议问题