How to display multiline text without scrolling in a UIView?

I have multiline text without HTML (with newlines). You need to display it inside ScrollView or just UIView.

I cannot display it as a UITextView: I cannot find how to resize the UITextView to text size and / or disable scrolling in it.

Should I output text in Label? Or something more suitable for this?

Thanks.

+3
source share
1 answer

Try using UILabel, then set the lineBreakMode property to UILineBreakModeWordWrap and the numberOfLines property to zero (unlimited lines).

, , , .

+2

Source: https://habr.com/ru/post/1709988/


All Articles