Open Nihonda opened 7 years ago
func autoCompleteTextField(_ textField: MLPAutoCompleteTextField!, possibleCompletionsForString: String!, completionHandler handler: (([AnyObject]?) -> Void)!) it works for me
It appears that the Swift converter changes the signature in a way that causes the crash.
In my case, I was able to replace it with the below, which resolved the crash. Note, I'm already up to Swift 4.1 so this syntax might not be 3.x compatible (didn't check).
internal func autoCompleteTextField(_ textField: MLPAutoCompleteTextField!, possibleCompletionsFor string: String!) -> [Any]! {
var result = [] as Array
// YOUR LOGIC HERE TO POPULATE result
// Return our result
return result as [Any]
}
Dear Eddy Borja
Asynchronous managing of a drop down table of autocomplete suggestions crashes in Swift3.x
NSAssert(0, @"An autocomplete datasource must implement either autoCompleteTextField:possibleCompletionsForString: or autoCompleteTextField:possibleCompletionsForString:completionHandler:"); But same works perfectly in Swift 2.x. Probably Apple change logics again. Please check.
It has been more than 2 years after update of your github repository.
Could you please address this issue.
Waiting so much, thank you