0

I am working on creating an app that I originally created with a storyboard, but now due to needing a horizontal scroll view for the majority of it, I'm moving to creating the view with code.

With the storyboard I was able to set my Button font to the Ultralight system font but I can not find a way to do this in code. I have tried these:

MyButton.titleLabel?.font = UIFont(name: "System-Thin", size: 70) 
MyButton.titleLabel?.font = UIFont(name: "system-Thin", size: 70)
MyButton.titleLabel?.font = UIFont(name: "system-Ultralight", size: 70)

But they have no effect(It just shows a default button, the method, however, does work with other fonts).

How would I go about setting an Ultralight System Font?

Edit: Ive also tried

MyButton.titleLabel?.font = UIFont.systemFontOfSize(70, weight: 0.3)

but no matter how small I set the weight the text does not get thinner than default

Arch
  • 127
  • 2
  • 12

0 Answers0