I'm planning on loading multi-paragraph content from a text file and displaying it on the UI. I'll be loading from one of several text files and won't know ahead of time how long the text is going to be. My first thought was to use a UILabel inside a UIScrollView. However, it doesn't seem like UILabel can be made to expand based on the number of lines it contains. Is this correct?
If UILabel isn't the right tool for the job, what should I use? UIWebView? Will UIWebView handle the scrolling nicely for me?
Check out UITextView
. You can place one inside a UIView, and the text view provides all the functionality of a scroll view, and more (it is a UIScrollView subsclas).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With