Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Links are not colorised when using setLink:range: #128

Frizlab opened this Issue · 3 comments

2 participants



I tried migrated to the new way of adding links, that is directly to the attributed string instead of telling the label to add the links.
The links were indeed detected (I was able to tap on them), but they were not colorised.

I did a bit a searching and I think I found the root cause of the problem. As I understand, the colorisation is done in recomputeLinksInTextIfNeeded. In this method there is a test to check whether it is actually needed to recompute links or not. The test goes as follow: if (!_attributedText || (self.automaticallyAddLinksForType == 0 && _customLinks.count == 0)). When using setLink:range:, none of the tests becomes false, then the link computation is given up which result in links not being colorised.

Thanks for your wonderful library by the way, it saved my life :)
Sorry if I missed anything.


You're right, there's an issue here. Will try to fix that anytime soon!


Any news?


Fixed by merge of #135 (see commit 362f9fa)

@AliSoftware AliSoftware closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.