I'm a beginner with swift and have reviewed this site to understand how importing custom fonts work. I've also reviewed this StackOverflow question which didn't seem to solve my specific issue
Upon reviewing the site, I've added the .tts file Lovelo-Black to the project and plist.
private let loginButton: UIButton = {
let button = UIButton()
button.setTitle("log in", for: .normal)
button.layer.masksToBounds = true
button.layer.cornerRadius = Constants.cornerRadius
button.backgroundColor = UIColorFromHex(rgbValue: 0x00FF9C,alpha: 1)
button.setTitleColor(.black, for: .normal)
button.titleLabel?.font = UIFont(name: "Lovelo-Black") //issue here
return button
Is it possible to make the button use the Lovelo-Black font? Ideally, I would like it to look like this
If it is possible, what should I replace the 8th line with?