Created
December 14, 2015 18:02
-
-
Save ZevEisenberg/192cbc24d644dbaa9021 to your computer and use it in GitHub Desktop.
Version of a UIFont with different symbolic traits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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