Skip to content

yatatsu/TKAutoCompleteTextField

Repository files navigation

TKAutoCompleteTextField

Version License Platform

TKAutoCompleteTextField is UITextField with simple auto complete. It shows list of suggestion below textField when you input some character.

alt tag

Usage

Set TKAutoCompleteTextField in xib or storyboard, and add property. Then,


// configure suggestions
self.autoCompleteTextField.suggestions = @[@"apple", @"orange", @"grape", @"lemon"];

// you can select match type; left-hand match or partical match.
self.autoCompleteTextField.enableStrictFirstMatch = YES; // default is NO

// you can select whether or not suggestion in empty input.
self.autoCompleteTextField.enablePreInputSearch = YES; // default is NO

it's all.

Other

Delegates

  • TKAutoCompleteTextField:heightForSuggestionView: : specify max height.
  • TKAutoCompleteTextField:numberOfVisibleRowInSuggestionView: : specify limit of visible suggestion count.
    • default count is 3.

properties

  • enableAutoComplete : show suggestion view.
  • enableStrictFirstMatch : left-hand match or partical match.
  • enablePreInputSearch : show suggestion view when input is empty.
  • marginLefTextPlaceholder
  • marginTopTextPlaceholder

auther

yatatsu, yatatsukitagawa@gmail.com

About

UITextField with auto completion.

Resources

License

Stars

Watchers

Forks

Packages

No packages published