mnbayan / AutocompleteTextfieldSwift

Simple and straightforward sublass of UITextfield to manage string suggestions
MIT License
290 stars 66 forks source link

Multiple TextFields. #11

Closed hugocarlmartin closed 8 years ago

hugocarlmartin commented 8 years ago

Greate component. I have a small problem.

Lets say I have 3 textfields I'm populating with autoCompleteStrings = [String]. And on textchange everything works as it should.

But I also have 2 textFields I would like the tableview to function as a "picker" instead. So when the specific textField becomeFirstResponder i would like to populate the tableView with strings and the one on [String][0] should be pre-filled in the textField.

Edit: I can't seem to hide one textFields tableView when another textField becomeFirstResponer

Does it make sense?

Pre-Salamat, ;)

mnbayan commented 8 years ago

Hi @hugocarlmartin , you can actually do that by setting textField.text = [String][0] right after you populated autoCompleteStrings

And hiding suggestions when another textField was selected has been added. Thanks for reporting.