I've looked into this. While this event gives me a heads up as to the next character getting entered, it still doesn't provide me with a way to pop up or override the autosuggestion feature.
They're basically saying to turn off the autocomplete textfield.autocorrectionType = UITextAutocorrectionNone. (I think)
Basically, you're going to create your own autocorrection feature.
Then use that method to check for the word. So in the method you'd be like:
Code:
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
if ([textField.text isEqualToString:@"fir"])
if (![string isEqualToString:@"e"]) {
// code to pop up a subview that has the word "fire" in it.
}
}
Then you could do many things. When someone hits the enter key, you can check to see if the view is up. If it is, then replace the word in the textField. If someone hits the spacebar (basically, if the replacement string is equal to a space) and the view is up, then replace the word.
It's tedious, but it's your only choice.