0
Boas, I wanted to find a way to change the entire app font (Swift) into a few lines of code. Right now I have
extension UILabel {
var substituteFontName : String {
get { return self.font.fontName }
set { self.font = UIFont(name: newValue, size: self.font.pointSize) }
}
and then in the Appdelegate in didFinishLaunchingWithOptions
UILabel.appearance().substituteFontName = "Roboto-Medium"
but it’s not working because of the error in Extension
Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
Can anyone help me? Thank you in advance
this solution is not solving my problem, because I intend to change the source of all the Abels... which is not happening
– Rui Alves