So far I could accomplish Auto Complete feature on a Textfield UI in Xcode 6 for my iOS app, but my challenge is to make it take multiple tags and then show suggestion for each one. For example:
Enter "Ja" and it shows "Java" in the list, I choose that, type "," and it make it a tag, then I start typing "PH" and it shows "PHP", and I choose that and place another "," and so on. Just like the Jquery Auto-complete for multiple tags. Is there a way to accomplish this in iOS ?
Link to Jquery AutoComplete Plugin
Since you have completed the autocompletion logic. You just need to show the results in a UITableView. Then use WSTagField
as shown below to show/hide suggestions table view.
let tagsField = WSTagsField()
// Events
tagsField.onDidAddTag = { field, tag in
//Remove suggestions tableview from the view
print("DidAddTag", tag.text)
}
tagsField.onDidChangeText = { _, text in
//Add suggestions table to the view
}
tagsField.onDidChangeHeightTo = { _, height in
//Update suggestions table frame to prevent tag field covering
}
tagsField.onValidateTag = { tag, tags in
// validate tag here to match your tags list
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With