SearchTextField
SearchTextField is a subclass of UITextField, written in Swift that makes really easy the ability to show an autocomplete suggestions list.
You can decide wether to show the list as soon as the field is focused or when the user starts typing.
You can also detects when the user stops typing, very useful when you can get a suggestion list from a remote server.
New Feature! Now you can make suggestions "inline", showing the first matched result as the placeholder (instead of the results list) and selecting it when the user touches the enter key.
Requirements
- iOS 9
Installation
SearchTextField is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Manual installation
Just import SearchTextField.swift into your project
Usage
You can use it in the simplest way...
...or you can customize it as you want
New feature: show the first matched result as placeholder (inline mode)
New feature: autocomplete from, for example, a list of email domains
Swift Versions
Swift 4 supported from 1.2.0 version.
Install v1.0.0 if you need to support Swift 2.3.
Install v1.0.2 and above if you want to support Swift 3.
Demo
Check out the Example project.
Author
Alejandro Pasccon, apasccon@gmail.com