Skip to content

Instantly share code, notes, and snippets.

- (NSAttributedString *)attributedStringWithString:(NSString *)string highlightedwithOccurencesOfString:(NSString *)stringToHighlight inColor:(DTColor *)color
{
// build an attributed string to start with
// font
DTCoreTextFontDescriptor *fontDesc = [[DTCoreTextFontDescriptor alloc] init];
fontDesc.fontFamily = @"Helvetica";
fontDesc.pointSize = 20;
// paragraph style