本文介绍了在具有多行的 UILabel 上自动收缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
是否可以在 UILabel
的多行上同时使用 autoshrink 属性?例如,2 行可用的大文本.
Is it possible to use the autoshrink property in conjunction on multiple lines on a UILabel
? for example, the large text size possible on 2 available lines.
推荐答案
这些人找到了解决方案:
These people found a solution:
http://www.11pixel.com/blog/28/resize-multi-line-text-to-fit-uilabel-on-iphone/
他们的解决方案如下:
为了让它工作,必须在界面构建器中将 IBOutlet 分配给 UILabel.
In order to get this working, a IBOutlet must be assigned in the interface builder to the UILabel.
"IBOutlet UILabel *msg;"
"IBOutlet UILabel *msg;"
所有的优点都是 11 像素的人.
All the merit is of the people at 11pixel.
这篇关于在具有多行的 UILabel 上自动收缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!