How to intercept text from the keyboard and format it before it show in the cell?


How to intercept text from the keyboard and format it before it show in the cell?



Part of the program I'm developing stores user-entered phone numbers, so I'd like to format them as they are entered. I've got the NSFormatter working when text is displayed in the cell from stored data, but I don't know how to format a phone number as it's being entered on the keyboard, as in Apple's contacts app.

How can I accomplish this?


UIWebView scrollBy replacement

1:

Hide the tab bar when displaying the ABPeoplePickerNavigationController?
Set the delegate of the text field to you controller class, implement the UITextFieldDelegate protocol and put your formatting code in the textField:shouldChangeCharactersInRange:replacementString: method.. Draw a shadow behind UIWebView
iPhone subview design (UIView vs UIViewController)

92 out of 100 based on 47 user ratings 402 reviews