How to make UITextView detect links for website, mail and phone number

后端 未结 7 1421
既然无缘
既然无缘 2020-11-27 16:38

I have a UITextView object. The text in UIView has a phone number, mail link, a website link. I want to show them as links with following functionality.

When someone

7条回答
  •  迷失自我
    2020-11-27 16:49

    If you are using OS3.0

    you can do it like the following

    textview.editable = NO;
    textview.dataDetectorTypes = UIDataDetectorTypeAll;
    

提交回复
热议问题