Use the dataDetectorTypes UITextView property to enable automatic detection of URLs, numbers, etc.
MyTextview.dataDetectorTypes = UIDataDetectorTypeLink ;
Possible values that can be assigned to dataDetectorTypes.
UIDataDetectorTypePhoneNumber, UIDataDetectorTypeLink more
source
share