Using Built-in Type Detectors
UITextView
s and UIWebView
s offer built-in data type detectors, including phone numbers, HTTP links, and so forth. Set the dataDetectorTypes
property to allow the view to automatically convert pattern matches into clickable URLs that are embedded into the view’s text. Legal types include addresses, calendar events, links, and phone numbers. Use UIDataDetectorTypeAll
to match all supported types or use UIDataDetectorTypeNone
to disable pattern matching.
Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.