How to change type of font in Label?

Hello everyone,


I am working on a Playground and I can change the font type of my label. I have tried doing it in several different ways and I just can't do it.


var clueLabel = UILabel()
clueLabel.font = UIFont(name: "MarkerFelt-Wide", size: 45)
clueLabel.font = UIFont.systemFont(ofSize: 45, weight: .bold)
clueLabel.textColor = UIColor.black
clueLabel.textAlignment = .center
view.addSubview(clueLabel)


What am I doing wrong? I want to use the font Marker Felt.


Thank you

Answered by OOPer in 419277022

With completely replacing `font` (line 03.), the pevious font setting (line 02.) is lost.


What do you want to do? Do you want to change `weight` of existing font?

Accepted Answer

With completely replacing `font` (line 03.), the pevious font setting (line 02.) is lost.


What do you want to do? Do you want to change `weight` of existing font?

OMG! 😟 Thanks a lot! How didn't I realize that?


Thank you!

How to change type of font in Label?
 
 
Q