iphone - How to render text with clickable hyperlinks where you can control the action for click? -


I'm trying to display some text in my app where the text may have some URL. I want to highlight URLs as hyperlinks and clickable. Also, when it is clicked, I want to provide a callback where I can perform a custom action. Of course the URL should be returned to my callback so that I know what to do with it (an in-app Open it in browser etc.).

It may look complicated, but basically all IM applications (more than 30) in AppStore have this functionality where the user can send the URL to the IM and the receiving end can click on it And open the page in the in-app browser

How is it done? I can not understand it if you have a solution, please provide the sample code. Thank you.


BTW:

The answer is not a UIWebView (because it is too slow to present many examples is).

The answer is also NOT A UITextView , although this URL is capable of parsing, a custom callback can not be set on this click. So it ends up opening the safari.

The answer is also not a TTSTLead text label , although it is capable of parsing the URL and giving it a custom action, it is specified previously in a URLMap and obviously this case We do not know what the URL is before hand. As far as I know that you can not specify all the URLs in a custom action.

As far as I know that you can not put all URLs in custom action.

I have given you my directions, read the source that I am connected to, because he answered this exact question TTURLMap Supports catch-ales via " -from: toViewController: selector " method. For example:

  [From the map: @ "*" Two visual controller: [View controller class] Selector: @Selector (some handler :));  

If you were working with a completely inappropriate library then I could understand the illusion, but the three 20 libraries very The point of joining is documented exactly what you are doing.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -