当前位置: 动力学知识库 > 问答 > 编程问答 >

user interface - iOS what element is most suitable for large texts eg text view

问题描述:

I wonder what ui element I should use for large sets of text. Eg anything between 200 - 1000 characters.

I already place the text inside a scrollview so it doesn't have to ve scrollable or editable etc, I just want to display text.

So what should I use between label / text view / text field?

Thanks in advance.

网友答案:

Text views are good for texts with varying lengths, but they have a scroll view of their own. You may consider using a normal UILabel and setting the "Lines" property to 0. I know that sounds strange, but setting it to 0 tells the label that it is a multi-line label. Then you can use auto layout to establish the width of the UILabel. It will grow down based on the amount of text in it. Text fields would be inappropriate for displaying texts in most cases; they are better for user input.

分享给朋友:
您可能感兴趣的文章:
随机阅读: