I am try to change font for a label but it's doesn't work font name:new New san francisco.
Import that font into project and add in info.plist and this is my code
labelname.font = [UIFont fontWithName:@"SF UI Text-Light" size:12];
If I use that's work fine
labelname.font = [UIFont fontWithName:@"HelveticaNeue" size:12];
But New san francisco font doesn't work. I don't know what I miss :(
That's happens because you use the wrong System name for the font. Try to use
labelname.font = [UIFont fontWithName:@"SFUIText-Light" size:12];
How to find System font names see here Adding custom fonts to iOS app finding their real names
I try to log the system font and find the font name is ".SFUIText-Light" ,so
labelname.font = [UIFont fontWithName:@".SFUIText-Light" size:12];
this is work.
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