mattt/TTTAttributedLabel — pull request #425 by renssies (2014-07-30 16:19:11+00:00)
Title: Added some customizability features

- Added the ability to use links in "truncationTokenString"
- Added the ability to shift the background for link taps
- Added "containsLinkAtPoint:" so you can make custom UIViews with a UITapGestureRecognizer and TTTAttributedLabel (see below)

"containsLinkAtPoint:" was needed when I created a UIView that was going to be used in a UITableView as "sticky" header. It contained 1-2 links to the user profile and the action the performed. However when you tapped the background it should also go to the action. That was not possible with TTTAttributedLabel, when you add a UITapGestureRecognizer to the superview of the TTTAttributedLabel the links in TTTAttributedLabel would stop working. If you made a custom subview that was below the TTTAttributedLabel and put the UITapGestureRecognizer on that it would not work when tapping inside the label where no link is.

Now in order to get it working you have to check in the delegate of the UITapGestureRecognizer if there is a link at that point.

```Obj-c
-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
CGPoint locationInLabel = [gestureRecognizer locationInView:self.attributedLabel];
if ([self.attributedLabel containslinkAtPoint:locationInLabel]) {
return NO;
}
return YES;
}
```