Skip to content

Instantly share code, notes, and snippets.

@alexshafran
Created July 15, 2013 18:42
Show Gist options
  • Save alexshafran/6002322 to your computer and use it in GitHub Desktop.
Save alexshafran/6002322 to your computer and use it in GitHub Desktop.
Line Spacing
CGFloat multiple = 0.75;
CFIndex theNumberOfSettings = 1;
CTParagraphStyleSetting theSettings[1] = {{ kCTParagraphStyleSpecifierLineHeightMultiple, sizeof(CGFloat), &multiple }};
CTParagraphStyleRef theParagraphRef = CTParagraphStyleCreate(theSettings, theNumberOfSettings);
[string addAttribute:(id)kCTParagraphStyleAttributeName value:(__bridge id)theParagraphRef range:NSMakeRange(0, [string length])];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment