How to select San Francisco font using Interface Builder for attributed UITextView?
11,200
You need to download the font, then install/use it according to the guidelines:
WWDC video on the subject:
There's also a github repo that contains the fonts and alternative instructions (in case you don't happen to have your Apple developer account handy):
*The font is still in a beta stage it looks like; use in production code at your own risk.
Related videos on Youtube
Author by
Meriw
Updated on September 26, 2022Comments
-
Meriw almost 2 years
I have an UITextView with attributed text in which I want to select the new 'San Francisco' font for certain parts of the text. However, I can't find the font from Xcode's font picker.
Is there a way to select San Francisco or select the system's default font (as as I normally would if using plain text) using attributed text in Interface Builder?
-
Meriw almost 9 yearsThanks. I thought there was a better approach.
-
TommyBs over 8 yearsThe question asks about using the font in an app, but I think according to the guidelines you're only allowed to use the font in mockups. So is this answer actually correct? Or am I misreading something. I assume you should just use the system font which will be San Francisco on iOS 9 and higher
-
l'L'l over 8 years@TommyBs: This question was asked before the system font San Francisco was officially released, so it was a work around solution. Now you should use the official system font.
-
Jonny over 8 yearsIs the official system font on iOS 9 San Francisco? Will it always be from now on? SF does still not show up in IB.
-
l'L'l about 8 years@Jonny: You will still need to download the font from the Apple developer site and install it. It doesn't make a whole lot of sense in my opinion, but that's apparently how they do things at the moment.