TTTAttributedLabel with large amounts of text which requires scrolling

589 views Asked by At

I am using the TTTAttributedLabel library to build links in a block of text. I believe TTTAttributedLabel uses UILabel (not easily scrollable) as a base class instead of UITextView which is scrollable. This text view can contain a relatively large amount of text which means that it will need to scroll in some cases. I can't find any help on the library to explain how to configure the TTTAttributedLabel to allow scrolling.

2

There are 2 answers

0
joelbyler On

Simply add the TTTAttributedLabel to a UIScrollView. As a bonus, you can add a constraint to the TTTAttributedLabel to match widths with its parent so it will only scroll vertically.

0
David On

You should set the same code below:

yourTTTAttributedLabel.extendsLinkTouchArea = NO;

It is the best solution. I hope useful.