mattmega4 / PredictiveTableViewFromTextField

A table view that will auto predict based on input from text field in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PredictiveTableViewFromTextFieldSwift

A table view that will auto predict based on input from text field in Swift

This is a Swift project that was translated from a Ray Wenderlich tutorial from 6+ years ago, blended with a StackOverFlow post from over a year ago that attempted to convert the objective C version to swift.

I have updated the project to work with Swift 4.

In the first version I had a prebuilt array of 3 strings. I recieved a few emails suggesting that it was not working, but the issue was that I had started each string with a Captiol letter and the use was starting the string with the lower case.

To negate this issue I have just created an empty array and have the user add the words that he/she wishes.

So, without furter babble from me, here is how to use this simple project.

  1. Type a word in
  2. When finished, Tap the 'Add' Button
  3. It will add the word to the array and clear the text field. Add as many as you want!
  4. Now, type in one of the words exactly as you typed it, and it should start to appear on the tableview underneath
  5. Tapping on that word will autofil the text field.

This is a very simple app. I did not want to put too much fancy stuff into it because then you might get confused as to what is important to the core idea. Please feel free to message me through my blog. www.matthewhsingleton.com

Thank you!

About

A table view that will auto predict based on input from text field in Swift


Languages

Language:Swift 100.0%