How to make UITextView detect links for website, mail and phone number
If you are using OS3.0
you can do it like the following
textview.editable = NO;textview.dataDetectorTypes = UIDataDetectorTypeAll;
A note on detecting email addresses: The Mail app must be installed (it's not on the iOS Simulator) for email links to open a message compose screen.
Swift 3.0 +
As of swift 3.0, use the following code if you want to do it programmatically.
textview.isEditable = falsetextview.dataDetectorTypes = .all
Or if you have a storyboard