I want to make phone numbers in a UITextView on a MapView tappable using datadetector but it is not working.
The textView in question is a subview of a generic UIView which is a subview of an MKAnnotationView on a Map so perhaps something in the hierarchy of subviews is causing the problem.
Here is the code to configure the textView:
textView.font = UIFont.systemFont(ofSize: 14)
textView.isUserInteractionEnabled = true
textView.isSelectable = true
textView.isEditable = false
textView.dataDetectorTypes = UIDataDetectorTypes.all
//mycustomview is a plain rectangular uiview
myCustomView.addSubview(textView)
//annotationview is an MKAnnotationView
annotationView.addSubview(myCustomView)
Thanks in advance for any suggestions