I'm trying to figure out how to change the style of a font to "Thin". Does anyone know how to do this?
Here's my best try, but it doesn't work:
m.font = UIFont(name: "Apple SD Gothic Neo", style: "Thin", size: 8.0)
Change Font And Size Of UILabel In Storyboard To change the font or the size of a UILabel in a Storyboard or . XIB file, open it in the interface builder. Select the label and then open up the Attribute Inspector (CMD + Option + 5). Select the button on the font box and then you can change your text size or font.
Press xcode->preferences. select fonts and colors. select ANY font in the list and press cmd+a (select all fonts) select font size for all editor fonts at the bottom of the window.
The way I have seen it is AppleSDGothicNeo-Thin
, No spaces, and a dash style. So your code would be
m.font = UIFont(name: "AppleSDGothicNeo-Thin", size: 8.0)
Edit:
I have come to understand why you use the font this way.
If you add a custom font to your project, it has a name of "SuperAwesomeFont-Light.ttf". So it makes sense that you just use the file name for the name of the font.
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