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?


Checking online status from an iPhone web app

1:

How to create a GUID/UUID using the iPhone SDK
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.. Accessing image data from a bitmap given a pointer
What is better: Global string or singleton?

72 out of 100 based on 22 user ratings 702 reviews

*