0

I wanted to add a custom font to my app so I added it here as I did for other labels.

let question = QuestionController.questionsList[questionIndex]
cell.nameLabel.text = question.answers?[indexPath.row]
cell.nameLabel.numberOfLines = 0
cell.nameLabel.lineBreakMode = .byWordWrapping
cell.nameLabel.font = UIFont(name: "USIS 1949", size, 25)

I can't get it to work for header/rows in the table cells. Instead, I have this error:

Cannot invoke initializer for type 'UIFont' with an argument list of type '(name: String, (UIContentContainer, CGSize) -> CGSize, Int)'

Is there an easy fix to this? Am I including font in the wrong section?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
sheishistoric
  • 85
  • 1
  • 9

1 Answers1

1

Try this:

let question = QuestionController.questionsList[questionIndex]
cell.nameLabel.text = question.answers?[indexPath.row]
cell.nameLabel.numberOfLines = 0
cell.nameLabel.lineBreakMode = .byWordWrapping
cell.nameLabel.font = UIFont(name: "USIS 1949", size: 25)
kunwar11
  • 123
  • 1
  • 1
  • 10