After being forced to have a go at some iOS development, I’m not sure if I’m suffering from the beginning stages of Stockholm syndrome or if I’m starting to enjoy it.
Regardless, one of the functions iOS development and MonoTouch isn’t so good with (compared to Android development) is autocomplete related use cases.
After reading http://www.raywenderlich.com/336/how-to-auto-complete-with-custom-values I put together a sample app that allows you to:
- Create your own auto complete collection.
- Search for strings within the collection.
- Return what the user has selected.
- Populate the text field with the user selection.
The full source is available on GitHub: https://github.com/LucasMoffitt/Monotouch-AutoCompleteDemo
The demo works by creating a custom table source and creating a UITableView that you show / hide as you need to.
If you have anything to add to the demo please feel free to fork and put together a pull request.