How to make a click link in a UITextView

I am developing an iphone application right now, where I will display an overview text with entries that can be found later in the application. I am wondering if there is a way to make a specific work clickable in order to send me to another screen, which will display more information about the place that was clicked.

+4
source share
2 answers

You can use this ...

self.myTextView.dataDetectorTypes =UIDataDetectorTypeLink; 
+6
source

if you want to use the active substring in your UITextView, you can use my advanced TextView ... its short and simple. You can edit it as you wish.

how to use (range = substring location):

 [self.textView addTapActionWithRange:range withActionBlock:^{ // anything you want to do - show something }]; 

result: enter image description here

source code: https://github.com/marekmand/ActiveSubstringTextView

0
source

All Articles