Skip to content

Multiple link colors #13

Open
Open

Description

@patrizcesar

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.

Activity

  1. evermeer commented on Nov 1, 2017

    @evermeer
    Owner

    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.

  2. patrizcesar commented on Nov 1, 2017

    @patrizcesar
    Author

    I see. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions