Is it possible to bold the font in a UIButton? With label, it's pretty simple such as:
label.font = UIFont(name:"HelveticaNeue-Bold", size: 16.0)
But this doesn't work for buttons.
For a UIButton
I tried this and works:
Swift 2
testButton.titleLabel?.font = UIFont.boldSystemFontOfSize(18)
Swift 3 & 4
testButton.titleLabel?.font = UIFont.boldSystemFont(ofSize: 18)
(Thank's to ConfusionTowers)
Swift 4+
button.titleLabel?.font = UIFont.systemFont(ofSize: 22.0, weight: .bold)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With