Latest 0.1.1
Homepage https://github.com/shim0mura/MultiAutoCompleteTextSwift
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

MultiAutocompleteTextSwift [Cocoapods Compatible]

TextField can suggest several words like Android’s ‘MultiAutoCompleteTextView’.
This code is modified from AutocompleteTextfieldSwift

Sample

Install

Cocoapods

Add MultiAutoCompleteTextSwift to Podfile.

pod 'MultiAutoCompleteTextSwift'

Carthage

Add the shim0mura/MultiAutoCompleteTextSwift to Carthfile.

github "shim0mura/MultiAutoCompleteTextSwift"

Basic Usage

Import the module.

import MultiAutoCompleteTextSwift

Create a text field and set its class as ‘MultiAutoCompleteTextSwift’ (on Storyboard).

Set suggest words as "autoCompleteStrings".


@IBOutlet weak var textField: MultiAutoCompleteTextField!
override func viewDidLoad() {
    super.viewDidLoad()
    let words = [ "ruby", "rust", "mruby", "php", "perl", "python"]
    textField.autoCompleteStrings = words
}

Customize

Multi way of suggest

let token = MultiAutoCompleteToken(top: "C++", subTexts: "cplusplus"),
textField.append(token)

If you want to suggest the word that has multi way of reading, Use MultiAutoCompleteToken class.

Sepataor

Words punctuated by ‘,’ and whitespace default. You can add other separator by ‘autoCompleteWordTokenizers’.

textField.autoCompleteWordTokenizers([',', ':', ';'])

Version

MultiAutoCompleteTextSwift support swift 3.0. In v0.1.0, MultiAutoCompleteTextSwift support swift 2.3.

License

MultiAutoCompleteTextSwift is under MIT license. See LICENSE for details.

Latest podspec

{
    "name": "MultiAutoCompleteTextSwift",
    "version": "0.1.1",
    "summary": "TextField can suggest several words like Android's 'MultiAutoCompleteTextView'",
    "homepage": "https://github.com/shim0mura/MultiAutoCompleteTextSwift",
    "license": "MIT",
    "authors": {
        "shim0mura": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/shim0mura/MultiAutoCompleteTextSwift.git",
        "tag": "0.1.1"
    },
    "source_files": "MultiAutoCompleteTextSwift/*.{swift}",
    "exclude_files": "Classes/Exclude",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This