Skip to content

Instantly share code, notes, and snippets.

@mattb mattb/gist:9652526
Created Mar 19, 2014

Embed
What would you like to do?
NSString *description = @"ABCDEFGHIJ";
NSMutableAttributedString *aDescription = [[NSMutableAttributedString alloc] initWithString:description];
[aDescription addAttributes:@{NSForegroundColorAttributeName: [UIColor redColor],
NSBackgroundColorAttributeName: [UIColor lightGrayColor],
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)}
range:NSRangeFromString(@"{2,5}")
];
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.