如何使UILabel wordwrap [英] How to make UILabel wordwrap
本文介绍了如何使UILabel wordwrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有做UILabel换行到下一行或者我必须使用UITextView?
Is there anyway of making a UILabel wrap to the next line or do I have to use a UITextView?
推荐答案
需要将 numberOfLines
属性设置为 0
,并以IB或编程方式显式指定其维度。但是,如果你有很多文本要显示,我建议使用UITextView。
You would need to set the numberOfLines
property to 0
and explicitly specify its dimensions, either in IB or programmatically. However, if you have a lot of text to display, I would recommend using a UITextView.
这篇关于如何使UILabel wordwrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文