This is a UITextField subclass that autofills the top google suggestion based on the text input. This is designed as a textfield replacement to provide suggestions.
Build and run the
AutoCompletingTextFieldDemo project in Xcode to see
SAAutoCompletingTextField in action.
Include the following framework in your project:
- In Project > Build Settings > Header Search Paths, add this “non-recursive” directory for TouchXML:
- In Project > Build Phases > Compile Sources, add this Compiler Flag for all TouchXML .m files:
Change the textfield class in IB in the Identity inspector > Custom Class field to SAAutoCompletingTextField. Or add the textfield into your view manually with:
SAAutoCompletingTextField *textField = [[SAAutoCompletingTextField alloc] init]; [self.view addSubview:textField];
Third Party Plugins
A big thank you to the makers of:
Copyright © 2009-2014 Shmoopi LLC.
This class and its usage are very intuitive and provide as simple an interface as possible for developers to plug into. Please feel free to customize the class as much as you'd like, or use any of the code within your projects. If you do add to the project, make sure to let me know so we can merge any changes.
If you like what you see here, or on our website, please feel free to drop us a line or purchase one of our applications!