iPhone SDK: disable auto creation of dot (.) in text field (or textview)

autocomplete, autocorrect, cocoa-touch, iphone, sdk

Solution

I found one solution - it uses UITextFieldTextDidChangeNotification because this occurs after the auto-correction applies.

- Set the delegate for the text field

Set up a notification

`- (void) viewDidLoad { ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:UITextFieldTextDidChangeNotification object:tfTitle]; }`

Then, notification handler `- (void)textFieldDidChange:(NSNotification *)aNotification { if ( [textField.text rangeOfString:@". "].length ) { // Change text textField.text = [textField.text stringByReplacingOccurrencesOfString:@". " withString:@" "]; } } `

Problem

I've disabled auto-correction type for my text field, and it does not show any other auto-correction, but it still automatically creates a dot (.) when I press space key twice. For example, if I write "test" and press space key twice, it automatically changes into "test. " Anyone knows how to disable this feature? Thanks a lot.

Original source

Related problems