Skip to content

Instantly share code, notes, and snippets.

@erica
Last active December 18, 2015 11:19
Show Gist options
  • Save erica/5775391 to your computer and use it in GitHub Desktop.
Save erica/5775391 to your computer and use it in GitHub Desktop.
NSMutableAttributedString *s = [NSMutableAttributedString string];
NSMutableAttributedString *word = [NSMutableAttributedString stringWithString:@"Lorem "];
word.font = [UIFont headline1];
[s appendAttributedString:word];
word = [NSMutableAttributedString stringWithString:@"ipsum "];
word.color = [UIColor redColor];
word.font = [UIFont body].italic;
[s appendAttributedString:word];
[s drawInRect:inset];
[s dumpAttributes];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment