Quick tip: Everyone knows that when you create a UITextView in Interface Builder you can easily switch it to automatically detect URLs, but recently I was looking for the code to do this dynamically and all I code find was a 15 line REG EX. So here’s how to set text fields to dynamically detect URLs natively in UIKit:
//allows your textView to detect all types myTextView.dataDetectorTypes = UIDataDetectorTypeAll //or if you just want links use: UIDataDetectorTypeLink //or just phone numbers use: UIDataDetectorTypePhoneNumber
So that’s it, nice and simple.
vimax
Resources including the one you talked about here will be really helpful to me! I will publish a link to this web page on my weblog. I am certain my visitors will find that very helpful.
vimax
E-bike
Very interesting subject , regards for putting up.
Stevie
Good point. I hadn’t thhougt about it quite that way. 🙂