我正在为 UIButton
的 titleLabel 设置 numberOfLines :
btnMailAddress.titleLabel.numberOfLines = 3;
在 iOS5 设备中,文本显示为 3 行,但在 iOS4.3 设备中,文本仅适合 1 行。
最佳答案
尝试将其设置为零。
btnMailAddress.titleLabel.numberOfLines = 0;
来自属性 numberOfLines
的 UILabel
文档。
For using as many lines as needed, set the value of this property to 0.
关于iphone - UIButton titleLabel 行数在 iOS5 上工作正常但在 iOS4.3 上不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8921575/