Latest 0.2.4
Homepage https://github.com/nferocious76/AutoCompleteTextField
License MIT
Platforms ios 8.0, requires ARC
Authors

CI Status
Version
License
Carthage compatible
Platform

ezgif com-resize 1

Features

  • [x] Provides a subclass of UITextField that has suggestion from input
  • [x] Data suggestion are provided by users
  • [x] Has autocomplete input feature
  • [x] Optimized and light weight

Requirements

  • iOS 8.0+ / Mac OS X 10.9+
  • Xcode 7.2+

Installation

CocoaPods

You can use CocoaPods to install AutoCompleteTextField by adding it to your Podfile:

pod "AutoCompleteTextField"

Carthage

Create a Cartfile that lists the framework and run carthage bootstrap. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/AutoCompleteTextField.framework to an iOS project.

github "nferocious76/AutoCompleteTextField"

Manually

  1. Download and drop /Pod/Classesfolder in your project.
  2. Congratulations!

Usage


// Subclass a TextField with 'AutoCompleteTextField'
let myTextField = AutoCompleteTextField(frame: CGRectMake(0, 0, 100, 30))

// Set dataSource, it can be setted from the XCode IB like TextFieldDelegate
myTextField.autoCompleteTextFieldDataSource = self

// Setting delimiter is optional. If setted, it will only look for suggestion if delimiter is found
myTextField.setDelimiter("@")

// 'autoCompleteTextFieldDelegate' acts like the default 'delegate' which 'delegate' is also accessible to the IB.
myTextField.autoCompleteTextFieldDelegate = YourDelegate

// Setting an autocompletion button with text field events
myTextField.showAutoCompleteButton(autoCompleteButtonViewMode: .WhileEditing)

// Then provide your data source to get the suggestion from inputs
func autoCompleteTextFieldDataSource(autoCompleteTextField: AutoCompleteTextField) -> [String] {

    return AutoCompleteTextField.domainNames // ["gmail.com", "hotmail.com", "domain.net"]
}

// Initializing with datasource
let textFieldWithDelegateAndDataSource = AutoCompleteTextField(frame: CGRect(x: 20, y: 64, width: view.frame.width - 40, height: 40), autoCompleteTextFieldDataSource: self)

Contribute

We would love for you to contribute to AutoCompleteTextField. See the LICENSE file for more info.

Author

Neil Francis Ramirez Hipona, [email protected]

About

This project was inpired by ‘HTAutocompleteTextField’ an Objc-C framework of the same feature.

License

AutoCompleteTextField is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AutoCompleteTextField",
    "version": "0.2.4",
    "summary": "TextField Subclass with auto completion feature.",
    "description": ""A TextField Subclass that has input suggestion for user's convenience where auto completion feature kicks in where the suggestions are from filtered data from the provided source of the user."",
    "homepage": "https://github.com/nferocious76/AutoCompleteTextField",
    "license": "MIT",
    "authors": {
        "Neil Francis Ramirez Hipona": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nferocious76/AutoCompleteTextField.git",
        "tag": "0.2.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "AutoCompleteTextField": [
            "Pod/Assets/**/*.{png,jpeg,jpg}"
        ]
    },
    "pushed_with_swift_version": "3.0-GM-CANDIDATE"
}

Pin It on Pinterest

Share This