How can I make interactive links like Twitter and Facebook app?

Possible duplicate:
How to make clickable expression on iOS?

On Twitter and Facebook, usernames such as @ and hashtags like # can be clicked and do something from this in the app.

What is the best way to implement something like this? It would be nice if there was a replacement for UILabel, for example.

+6
source share
2 answers

The gtub TTTAttributedLabel project is a replacement for UILabel that supports link embedding. https://github.com/mattt/TTTAttributedLabel

+6
source

I'm not sure what Twitter is doing, but the Facebook app uses a library called Three20 to achieve UILabels Rich Text. They can be formatted and have embedded hyperlinks. You should specifically look at the TTStyledTextLabel.

Check this out: http://three20.info/

-1
source

Source: https://habr.com/ru/post/891038/


All Articles