You can get the string that should be in the text box after this method:
NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:string];
And that you can probably use neString "as is" to search the database.
If you just want to receive an event when the user deletes some characters in textField, you can check it as follows:
if ([string length] == 0 && range.length > 0)
Vladimir
source share