Want a UITextView not a userInteract, but find out click links

I placed a UITextView in a subclass of UITableViewCell, and tableView: didSelectRowAtIndexPath: is only called when I click on a cell outside of the UITextView, however, when I click on the link inside, Safari opens.

How can I handle clicks inside a UITextView without assuming that I need to click on the link?

PS setup

myTextView.userInteractionEnabled = NO 

looks great but no links are found

+4
source share
1 answer

No need to disable user interaction. Instead, make textView unavailable for editing:

 myTextView.editable = NO; 
+2
source

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


All Articles