UILabel 需要设置 NumberOfLines 以适合我的文本大小
我有一个 UILabel。我需要设置行数以适合其文本。
I have a UILabel
. I need to set the number of lines to fit to it's text.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
numberOfLines
属性设置为 0,这将消除任何行限制并根据需要使用任意数量的行。You can set the
numberOfLines
property to 0, which removes any line limit and uses as many lines as needed.