Closed patrick-fitzgerald closed 11 years ago
Using your code I got a warning that the autocompleteTextField
was declared as a weak property in MLPViewController. I was only able to get the textfield to appear by changing it to strong. If you don't do that it will deallocate before it gets the chance to be added to self.view
Thanks Eddy, that was the problem. Cheers
@paddydub Hi, I follow your code to use addSubview to create my view. The textfield appears but always having dataSource exception, I also noticed that there's a warning about assigning incompatible strong/weak to autoCompleteDataSource. Do you have any idea about this problem maybe causing dataStore expception? Thanks!
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An autocomplete datasource must implement either autoCompleteTextField:possibleCompletionsForString: or autoCompleteTextField:possibleCompletionsForString:completion
Hi @EddyBorja @harryhow Facing the same problem...any solution found???
Hey , I managed to found the solution as below. It was regarding the change in the syntax of Swift 3.0
func autoCompleteTextField(_ textField: MLPAutoCompleteTextField!, possibleCompletionsForString string: String!) -> [AnyObject]! { return myList as [AnyObject]! }
Hi, First of all thanks for a great plugin. I'm using the example project and I've been trying to add the MLPAutoCompleteTextField to the MLPViewController programatically. I've deleted the view.xib file, but I cannot seem to get the custom text field to appear in the view programatically. Could you please advise how I can achieve this. I've included my viewDidLoad implementation below. Thanks again, Patrick