Ami*_*mit -2
有一个只读属性可以让你做到这一点。你可以像这样访问它
nameLabel.adjustsFontSizeToFitWidth = YES;
//Make sure to use the line below AFTER the line above
float fontSize = nameLabel.font.xHeight;
Run Code Online (Sandbox Code Playgroud)
这将为您提供调整为适合宽度后的字体大小。
| 归档时间: |
|
| 查看次数: |
2589 次 |
| 最近记录: |