EddyBorja / MLPAutoCompleteTextField

UITextfield subclass with autocomplete menu. For iOS.
Other
1.21k stars 222 forks source link

pass array of objects in possibleCompletionsForString #91

Open mirzadelic opened 8 years ago

mirzadelic commented 8 years ago

How can i pass array of objects:

    func autoCompleteTextField(textField: MLPAutoCompleteTextField!, possibleCompletionsForString string: String!) -> [AnyObject]! {
        return [
            Obj,
            Obj,
            Obj,
            Obj
        ]
    }

then to show Obj.name field to cell?

hardikamal commented 8 years ago

@mirzadelic any solution found to this?.even i want to pass the array obtained from the json...

mirzadelic commented 8 years ago

No :(

hardikamal commented 8 years ago

i found it.... move all the datasource thing in your viewcontroller and set viewcontroller delegate "MLPAutoCompleteTextFieldDataSource" then connect datasource to your viewcontroller instead of datasource object...then set your array from the webservice to the MLPAutoCompleteTextFieldDataSource delegate method.....