1. It is used for Uitextview and UIWebView, with the property name: Datadetetortypes
2. This property can be set to make text that matches the phone, mail, URL, date, and so on, into linked text.
3. When the phone number is clicked, the URL will open with Safari, the email will open with mail, and the format date will pop up with a actionsheet, create event, show in Calendar, and copy three options.
4. Examples of use:
Uitextview *textview = [[Uitextview alloc] Initwithframe:cgrectmake (20, 20, 280, 200)];
Textview.datadetectortypes = Uidatadetectortypeall;
Textview.font = [Uifont systemfontofsize:20];
textview.editable = NO;
Textview.text = @ "My phone nmuber is +8602980000000\r\n" "My web site was www.xxxxxx.com.\r\n" "My email-address is [email PR Otected] "" I was BORN in 1009-09-02 ";
Add a text view when the view
[Self.view Addsubview:textview];
The effect is as follows:
Uikit--uidatadetectors (data detector) in iOS it turns the phone, mail, URL, etc. into a link