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?
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)