Using TTTAttributedLabel with Regex : Welcome TTTRegexAttributedLabel

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)

OBJECTIVE-C
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]];
Click to expand and view more

Enjoy it !

More…

Quentin Rousseau

Quentin Rousseau

CTO & Co-founder at Rootly (YC S21)

San Francisco, CA

Former Instacart SRE. Rock climber & wine enthusiast.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut