Specify multiple/conditional link colors in TTTAttributedLabel
问题 I've added a link detector to TTTAttributedLabel that identifies @mentions and #hashtags and creates a link at that position in my TTTAttributedLabel instance: - (void)highlightMentionsInString:(NSString *)text withColor:(UIColor *)color isBold:(BOOL)bold isUnderlined:(BOOL)underlined { NSRegularExpression *mentionExpression = [NSRegularExpression regularExpressionWithPattern:@"(?:^|\\s)(@\\w+)" options:NO error:nil]; NSArray *matches = [mentionExpression matchesInString:text options:0 range