I have to add custom font to my app. I added fonts to my project and listed infolist.
enum Proxima: String {
case regular = "Regular"
func font(size: CGFloat) -> UIFont {
return UIFont(name: "Proxima-\(rawValue)", size: size)!
}
}
Fatal error: Unexpectedly found nil while unwrapping an Optional value while calling
self.headTitle.font = UIFont.Proxima.regular.font(size: 30)
UPDATE
I added the target and also checked the copy bundle resources all are correct but still i got same error.
info.plist
Be sure that your files are added to your target
Also, don't forget to add them into the "Font provided by application" section of the Info.plist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With