Created
March 19, 2014 22:10
-
-
Save mattb/9652526 to your computer and use it in GitHub Desktop.
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
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