Skip to content

Instantly share code, notes, and snippets.

@paulyoung
Created March 25, 2014 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulyoung/9753594 to your computer and use it in GitHub Desktop.
Save paulyoung/9753594 to your computer and use it in GitHub Desktop.
Dynamic type sizes
NSLog(@"Headline: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleHeadline] pointSize]);
NSLog(@"Subheadline: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleSubheadline] pointSize]);
NSLog(@"Body: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody] pointSize]);
NSLog(@"Caption1: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleCaption1] pointSize]);
NSLog(@"Caption2: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleCaption2] pointSize]);
NSLog(@"Footnote: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleFootnote] pointSize]);
Headline: 17.000000
Subheadline: 15.000000
Body: 17.000000
Caption1: 12.000000
Caption2: 11.000000
Footnote: 13.000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment