Reputation: 13
I wish to programatically set the font of a label to system font Bold. I am using the following code to set the font but I do not know how to set it to Bold.
mylabel.font = UIFont.systemFontOfSize(14)
Upvotes: 0
Views: 2558
Reputation: 1497
Can use system font
label.font = UIFont.boldSystemFont(ofSize: 14.0)
OR
Font attribute
label.font = UIFont(name:"HelveticaNeue-Bold", size: 14.0)
Upvotes: 1
Reputation: 65
if you want to set the System font you Can go for
label.font = UIFont.boldSystemFont(ofSize: 16.0)
if you want to set the customs font you can use below
label.font = UIFont(name:"FontName-Bold", size: 16.0)
Upvotes: 2