AttributedTextView
AttributedTextView copied to clipboard
Multiple link colors
Is there a way to set link colors differently in a single attributer? This is the first (blue) link and this one is the second (green) link
Thanks.
Unfortunately you can't do that. It's a limitation of the NSAttributedText. On one UITextField you can only set a .linkColor for the entire control.
But I do see that TTAttributedLabel does have support for it. It looks like they don't use the default link mechanism. See: https://stackoverflow.com/questions/16555425/coloring-links-with-multiple-various-colors-in-the-same-nsattributedstring
I will have a look later to see how they implemented that.
I see. Thank you!