Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zoonooz/zftokenfield
iOS custom view that let you add token view inside like NSTokenField
https://github.com/zoonooz/zftokenfield
ios ios-ui objective-c token-field tokenfield
Last synced: 3 days ago
JSON representation
iOS custom view that let you add token view inside like NSTokenField
- Host: GitHub
- URL: https://github.com/zoonooz/zftokenfield
- Owner: zoonooz
- License: mit
- Created: 2014-11-11T07:42:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-12-22T18:08:22.000Z (about 5 years ago)
- Last Synced: 2024-12-23T22:09:57.273Z (11 days ago)
- Topics: ios, ios-ui, objective-c, token-field, tokenfield
- Language: Objective-C
- Size: 82 KB
- Stars: 334
- Watchers: 20
- Forks: 58
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ZFTokenField
============iOS custom view that let you add token view inside like NSTokenField
## Installation
```pod 'ZFTokenField'```
## Usage
### ZFTokenFieldDataSource
You need to implement these in your datasource class* ```lineHeightForTokenInField:tokenField:``` return desire line height.
* ```numberOfTokenInField:``` return number of token that you want to display.
* ```tokenField:viewForTokenAtIndex:``` return view that you want to display at specify index### ZFTokenFieldDelegate
* ```tokenMarginInTokenInField:``` your prefered margin, default is 0
* ```tokenField:didRemoveTokenAtIndex:``` get called when user deletes token at particular index.
* ```tokenField:didReturnWithText:``` get called when user hits return with text.
* ```tokenField:didTextChanged:``` get called when user changes text.
* ```tokenFieldDidBeginEditing:``` get called when user begins edit the field.
* ```tokenFieldShouldEndEditing:``` get called to ask if the field should end editing.
* ```tokenFieldDidEndEditing:``` get called when user stops edit the field.## Author
Amornchai Kanokpullwad, [email protected] [@zoonref](http://twitter.com/zoonref)
## License
ZFTokenField is available under the MIT license. See the LICENSE file for more info.