Using TTTAttributedLabel With Regex : Welcome TTTRegexAttributedLabel

| Comments

Hi there !

If you are looking a easy library to use to apply Regex with TTTAttributedLabel from Mattt Thompson, i build a lib called TTTRegexAttributedLabel.

Example

Screenshot

Usage

Below a quick example hot to use it ( First example in the Screenshot)

1
2
3
4
5
TTTRegexAttributedLabel *label1 = [[TTTRegexAttributedLabel alloc] initWithFrame:CGRectMake(25, 20, self.view.bounds.size.width - 50, 160)];
label1.numberOfLines = ;
label1.textAlignment = NSTextAlignmentCenter;
NSString *s1 = @“Soft kitty,\nWarm kitty,\nLittle ball of fur.\nHappy kitty,\nSleepy kitty,\nPurr, purr, purr.;
[label1 setText:s1 withFirstMatchRegex:@“kitty withFont:[UIFont boldSystemFontOfSize:20] withColor:[UIColor redColor]];

Enjoy it !

More…