One question that seems to come up time and time again is how to create tappable words within a UILabel. Earlier I mentioned an open source project providing a solution, but that project seems to have developed some issues.
Here’s a new library from Sebastian Thibeaud that makes it easy to create tappable words inspired by the Twitter syntax making words prefixed with @ or # clickable along with http links with a very simple callback system that uses the tagged word. You can also define the colors for the different tags.
Here’s an example given on the Github page of the library in use:
[tweetLabel setFont:[UIFont fontWithName:@"HelveticaNeue" size:17.0]];
[tweetLabel setTextColor:[UIColor blackColor]];
[tweetLabel setDelegate:self];
[tweetLabel setText:@"Hi. This is a new tool for @you! Developed by->@SebThiebaud for #iPhone #ObjC… 😉 My GitHub page: https://t.co/pQXDoiYA"];
[self.view addSubview:tweetLabel];
And an image from the demo app with the #ObjC tag clicked:
You can find STTweetLabel on Github here.
Looks like a good solution if you’re looking to create tappable words within a UIView.
Original article: Open Source Library For Easily Creating A UILabel With Clickable Words
©2012 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.






