Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Version of a UIFont with different symbolic traits
static UIFont *versionOfFontWithSymbolicTraits(UIFont *font, UIFontDescriptorSymbolicTraits symbolicTraits)
{
UIFontDescriptor *descriptor = font.fontDescriptor;
UIFontDescriptor *descriptorToUse = [descriptor fontDescriptorWithSymbolicTraits:symbolicTraits];
UIFont *newFont = [UIFont fontWithDescriptor:descriptorToUse size:font.pointSize];
return newFont;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.