Skip to content

scireum/SCITokenSearchField

Repository files navigation

SCITokenSearchField

Build Status

SCITokenSearchField is based on VENTokenField but has the look of the native UISearchBar.

alt text

Installation

The easiest way to get started is to use CocoaPods. Add the following line to your Podfile:

pod 'SCITokenSearchField', '~> 1.0'

Usage

SCITokenSearchField provides two protocols: <SCITokenSearchFieldDelegate> and <SCITokenSearchFieldDataSource>.

SCITokenSearchFieldDelegate

This protocol notifies you when things happen in the tokenSearchField that you might want to know about.

  • tokenSearchField:didEnterText: is called when a user hits the return key on the input field.
  • tokenSearchField:didDeleteTokenAtIndex: is called when a user deletes a token at a particular index.
  • tokenSearchField:didChangeText: is called when a user changes the text in the input field.
  • tokenSearchFieldDidBeginEditing: is called when the input field becomes first responder.

SCITokenSearchFieldDataSource

This protocol allows you to provide info about what you want to present in the tokenSearchField.

  • tokenSearchField:titleForTokenAtIndex: to specify what the title for the token at a particular index should be.
  • numberOfTokensInTokenSearchField: to specify how many tokens you have.
  • clearTokenSearchFieldData: to clear the tokens and the searchfield content

Sample Project

Check out the sample project in this repo for sample usage.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •