iosuibuttonnsattributedstring

Text with multiple buttons


Inside a tableview cell I want to display text like
Marc is now friends with Chris .
I want to use both Marc and Chris as buttons to navigate to their profile.

My first idea was to use NSAttributedString but I do not know if I can use the text as different buttons. I´m not a complete newbie so navigation works, display of cells works everything works. I am not asking for working code but I have no idea how to solve this... Maybe someone could tell me which class could help me.

Thanks in advance.


Solution

  • Use TTTAttributedLabel from github. Provides this capability out of the box using various attributes on NSAttributedString