UITextView's text going beyond bounds

后端 未结 7 1488
深忆病人
深忆病人 2020-12-30 01:24

I have a non-scrollable UITextView with it\'s layoutManager maximumNumberOfLines set to 9, which works fine, but, I cannot seem to find a method in NSLayoutManager that rest

7条回答
  •  不知归路
    2020-12-30 02:05

    No need to find number of lines. We can get all these things by calculating the cursor position from the textview and according to that we can minimize the UIFont of UITextView according to the height of UITextView.

    Here is below link.Please refer this. https://github.com/jayaprada-behera/CustomTextView

提交回复
热议问题