iphone - How to a clickable url / email / phone number on UITextView -


i receiving server response sting can contain url or email address or phone number ie same string can have 3 of them or 1 number , couple of url. nothing fixed.

i using uitextview show sting on device. want these url/email/phone number show hyperlink , on clicking these hyperlink user should able see webpage if url, draft , send email if email address or call number when clicked on number hyper link

can suggest me way this. or suggest other data view used can make things easy

set data detector types of uitextview. there number of options:

uidatadetectortypephonenumber

uidatadetectortypelink

uidatadetectortypeaddress

uidatadetectortypecalendarevent

uidatadetectortypenone

uidatadetectortypeall

so, in case, you'd do:

self.mytextview.datadetectortypes = uidatadetectortypeall; 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -