Reputation: 6150
I want to use SF Pro Text font for my iOS app. AFAIK, SF is the default font since iOS 9, and SF Pro is the default at iOS 11.
But when I'm choosing the "system" font at the storyboard, and I'm testing some label with the system font, this is the result:
po acountLabel.font.fontName
".SFUIText"
Is SFUIText is the same as SF Pro text? If not, then how can I set the font to SF Pro?
Upvotes: 2
Views: 1351
Reputation: 58019
Yes, .SFUIText
actually refers to SF Pro on iOS 11 (which replaced the "normal" SF font throughout the whole system).
You can easily test this by either doing what you did (printing the font name of a default label), or by investigating the font name of UIFont.systemFont(ofSize:)
:
print(UIFont.systemFont(ofSize: UIFont.systemFontSize).fontName) //.SFUIText
Upvotes: 2