Name: VENTokenField
Owner: Kik Interactive
Description: Easy-to-use token field that is used in the Venmo app.
Forked from: venmo/VENTokenField
Created: 2016-03-08 09:48:55.0
Updated: 2017-05-21 17:26:23.0
Pushed: 2016-04-05 06:35:39.0
Size: 168
Language: Objective-C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
t text](http://i.imgur.com/a1FfEBi.gif "VENTokenField demo")
allation
--------
easiest way to get started is to use [CocoaPods](http://cocoapods.org/). Just add the following line to your Podfile:
pod 'VENTokenField', '~> 2.0'
e
-
ou've ever used a ```UITableView```, using ```VENTokenField``` should be a breeze.
lar to ```UITableView```, ```VENTokenField``` provides two protocols: ```<VENTokenFieldDelegate>``` and ```<VENTokenFieldDataSource>```.
VENTokenFieldDelegate
protocol notifies you when things happen in the token field that you might want to know about.
`tokenField:didEnterText:``` is called when a user hits the return key on the input field.
`tokenField:didDeleteTokenAtIndex:``` is called when a user deletes a token at a particular index.
`tokenField:didChangeText:``` is called when a user changes the text in the input field.
`tokenFieldDidBeginEditing:``` is called when the input field becomes first responder.
VENTokenFieldDataSource
protocol allows you to provide info about what you want to present in the token field.
ement...
`tokenField:titleForTokenAtIndex:``` to specify what the title for the token at a particular index should be.
`numberOfTokensInTokenField:``` to specify how many tokens you have.
`tokenFieldCollapsedText:``` to specify what you want the token field to say in the collapsed state.
le Project
----------
k out the [sample project](https://github.com/venmo/VENTokenField/tree/master/VENTokenFieldSample) in this repo for sample usage.
ributing
--------
love to see your ideas for improving this library! The best way to contribute is by submitting a pull request. We'll do our best to respond to your patch as soon as possible. You can also submit a [new GitHub issue](https://github.com/venmo/VENTokenField/issues/new) if you find bugs or have questions. :octocat:
se make sure to follow our general coding style and add test coverage for new features!