【发布时间】:2017-10-14 19:43:10
【问题描述】:
我希望用户能够使文本变大。
我已经知道如何增加按钮的整体大小,但文本保持不变。
button.frame = CGRect(x: 100, y: 400, width: 100, height: 50)
如何在swift3中实用地增加按钮的字体大小?
【问题讨论】:
标签: ios swift button text swift3
我希望用户能够使文本变大。
我已经知道如何增加按钮的整体大小,但文本保持不变。
button.frame = CGRect(x: 100, y: 400, width: 100, height: 50)
如何在swift3中实用地增加按钮的字体大小?
【问题讨论】:
标签: ios swift button text swift3
使用titleLabel,像这样:
let button = UIButton()
button.titleLabel?.font = UIFont.systemFont(ofSize: 30)
你可以通过多种方式使用 UIFont,检查它的构造函数!
【讨论】: