I have a UITextfield, and as the user enters some text I need the text field to suggest some words from an array.
I have looked all over and it seems everyone is creating a table or something to display the suggestions.
Is there a way I can customise the default iOS autocompletion to use my source for the suggestions?
You can’t override the “default” spell checking autocompletion in UITextField, because the spell checking autocompletion is intended to correct errors and is handled by the OS itself (you can, however, disable it).
The way that most autocompletion systems work in iOS is using the very helpful UISearchDisplayController. You don’t need a lot of code to get this working correctly, but it does require some screen real estate for showing a list of responses (like Google searches in Safari).
Apple has a decent bit of sameple code to show how to do this. It’s available here.