Skip to content

Instantly share code, notes, and snippets.

@DougFischer
Created July 8, 2014 04:24
Show Gist options
  • Select an option

  • Save DougFischer/676b1ebbd2260d3dca7a to your computer and use it in GitHub Desktop.

Select an option

Save DougFischer/676b1ebbd2260d3dca7a to your computer and use it in GitHub Desktop.
- (BOOL)textField:(UITextField *)textField
shouldChangeCharactersInRange:(NSRange)range
replacementString:(NSString *)string {
autocompleteTableView.hidden = NO;
NSString *substring = [NSString stringWithString:textField.text];
substring = [substring
stringByReplacingCharactersInRange:range withString:string];
[self searchAutocompleteEntriesWithSubstring:substring];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment