NSMutableAttributedString and Adding a Link to text
I have a NSMutableAttributedString, Now I want to add Link to some portion of the text. how can i add a link to the tex开发者_JS百科t so that when the user touches the text i can fire some actions. I'm working in iOS 4.2
Thanks in Advance. Shinto
I did a library a few months back that dealt with that exact use case. However, I had to re-use it last week and found out that CMTextLabel isn't very user-friendly.
https://github.com/pothibo/CMFramework/tree/master/CMKit/RichText
You could have a look at it. If you decide to use it and refactor some of it to make it easier to use, send a push request and I'll merge it.
精彩评论