I'm using xCode 9.3.1 & Swift 4.1.
I'm trying to use SF Pro Text Medium font in my app code programatically. But this font is not found in the source code in swift file and app crashes.
Here is the code: NSAttributedStringKey.font: UIFont(name: ".SFProText-Medium", size: 24.0)!
At run time it throws following error: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Any other standard font work.
This font is available in the storyboard and I've used it successfully.
Why doesn't it work programatically? Do I've to add it in the xCode (plist etc) to make it work?