I create an NSMutableAttributedString
like this:
UIFont *font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
NSDictionary *attributes = @{ NSFontAttributeName: font };
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:str attributes:attributes];
Now I'd like to italicize specific ranges of attrStr via something like:
- (void)setAttributes:(NSDictionary *)attrs range:(NSRange)range;
but since I never asked for a specific font I'm not sure how I'd go about it.