tags:

views:

208

answers:

1

Hi, using iphone sdk 3.0 can someone say how to format a UITextField or UITextView so that when the user enters a phone number it will be formatted the way the contacts application formats the number ie +1 (888) 465-375 How to do this?

Thanks

+1  A: 

For a UITextView you can use:

[aTextView setDataDetectorTypes:UIDataDetectorTypeAll];

I don't think there is such an option for a UITextField.

Tom Irving