Skip to content

Instantly share code, notes, and snippets.

@jlcampana
Created November 22, 2012 10:11
Show Gist options
  • Save jlcampana/4130384 to your computer and use it in GitHub Desktop.
Save jlcampana/4130384 to your computer and use it in GitHub Desktop.
Lanzar búsqueda mientras escribes
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSString *newSearch = [textField.text stringByReplacingCharactersInRange:range withString:string];
NSLog(@"%@",newSearch);
if ([newSearch length] >= MIN_NUMBER_OF_CHARACTERS_TO_LAUCH_SEARCH)
{
//Hacer búsqueda con newSearch
}
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment