Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text doesn't autocomplete? #16

Open
surayashivji opened this issue Feb 13, 2016 · 3 comments
Open

Text doesn't autocomplete? #16

surayashivji opened this issue Feb 13, 2016 · 3 comments

Comments

@surayashivji
Copy link

I've implemented all that is required from this great add on, but for some reason, though the "autoCompleteStrings" appear in the table view for the text field, it doesn't actually autocomplete when I begin typing. is there a problem with my handleTextFieldInterfaces?

`private func handleTextFieldInterfaces()
{
self.chemicalAuto.onTextChange = {[weak self] text in

        print("Change")
        var keys = Array(DataSource.sharedManager.chemicalTable.keys)
        self!.chemicalAuto.autoCompleteStrings = keys
}

    self.chemicalAuto.onSelect =
    {
        [weak self] text, indexpath in

        print("select")
        var keys = Array(DataSource.sharedManager.chemicalTable.keys)
        self!.chemicalAuto.autoCompleteStrings = keys
    }
}`
@mnbayan
Copy link
Owner

mnbayan commented Mar 24, 2016

Hi @surayashivji , i wasn't able to replicate this issue. But I have updated the code for the latest swift version. Please try if this will work for you first. Thank you.

@wasimsandhu
Copy link

I am having the same issue on my end.

@mnbayan
Copy link
Owner

mnbayan commented Jul 3, 2016

@surayashivji @wasimsandhu I cannot replicate this issue on my end. Autocomplete strings are showing on table view when assigning strings to the autoCompleteStrings property.

However as to what is wrong on @surayashivji 's code snippet above, on self.chemicalAuto.onSelect please remove the ff:

var keys = Array(DataSource.sharedManager.chemicalTable.keys)
self!.chemicalAuto.autoCompleteStrings = keys

because this asks the library to once again reload and display another set of autocomplete strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants