Hey I got a problem with a tutorial I found for autocompletion: It says -
Now, when the text in the text field has changed (ie: in the EditingChanged handler), just call the GetSuggestions method, which will return an array of strings that match the parameter passed
NSArray *suggestions = [autocomplete GetSuggestions:textField.text];
You can do whatever you want with these suggestions, I displayed them in a table view and when the user taps a cell, the text is added to the text field (source)
Well I placed the array in
...textField:(UITextField *)textField shouldChangeCharactersInRange...
but I cannot figure out how to 'call' the suggestions when I write something right behind my text somewhat like autocorrection :/ any thoughts?
tried something like
if ([textField.text length] > 0){
..somehow call suggestions
}
but that just doesn't work :P