In my project I've added TTTAttributedLabel to a view in IB and added a link to it.
I've looked through similar questions on SO (like this and this), but no luck.
It displays properly, link is styled as expected. But
(lldb) po label.gestureRecognizers
<UILongPressGestureRecognizer: 0x7f88f6c5d480; state = Began; view = <TTTAttributedLabel 0x7f88f6f8ada0>; target= <(action=longPressGestureDidFire:, target=<TTTAttributedLabel 0x7f88f6f8ada0>)>>
RFStaticAttributedLabelFormView *labelView = [RFStaticAttributedLabelFormView new];
labelView.staticLabel.userInteractionEnabled = YES;
labelView.staticLabel.delegate = self;
NSString *text = RFLocalized(@"TXT_FINES_SEARCH_FNS");
[labelView.staticLabel setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:nil];
NSRange r = [text rangeOfString:RFLocalized(@"TXT_FINES_SEARCH_FNS_LINK")];
[labelView.staticLabel addLinkToURL:[NSURL URLWithString:@"http://www.google.com"] withRange:r];
I've created a fresh new project with a single TTTAttributedLabel. After I hooked up delegate methods everything started to work as expected, including a single tap. I've checked gesture recognisers on the label - and it turns out it doesn't have a tap recogniser either, only a long press one.
After that I reviewed my original project and I've found the origin of the problem. The main view in the hierarchy had another tap gesture recogniser that was intercepting all tap events. I've added this line:
tap.cancelsTouchesInView = NO;
And links in TTTAttributedLabel started to work as it should. Hope this answer helps someone with the similar problem.