ZFTokenField

本人视频教程系类   iOS中CALayer的使用

效果图:

iOS custom view that let you add token view inside like NSTokenField

iOS定制的view,让你在NSTokenField中添加token view.

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.  返回你想要显示的token的个数
  • tokenField:viewForTokenAtIndex: return view that you want to display at specify index 返回你想要显示的某个指定的token

ZFTokenFieldDelegate 代理方法

  • tokenMarginInTokenInField: your prefered margin, default is 0  页边留白,默认值是0
  • tokenField:didRemoveTokenAtIndex: get called when user deletes token at particular index. 当用户删除了某个token后调用的方法
  • tokenField:didReturnWithText: get called when user hits return with text. 当用户点击了return按钮后执行的方法
  • 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, amornchai.zoon@gmail.com @zoonref

License

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

[翻译] ZFTokenField的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. 解决Ubuntu系统的每次开机重启后,resolv.conf清空的问题和DNS域名解析问题(图文详解)

    不多说,直接上干货! 问题情况描述如下: 普及知识:   /etc/resolv.conf ,其实是一个Link .它其实指向的是 /run/resolvconf/resolv.conf.  Ubun ...

  2. 多线程编程(二)-Exchanger的使用

    Exchanger的介绍 类Exchanger的功能可以使两个线程之间传输数据. 方法exchange()的使用 package com.wjg.unit; import java.util.conc ...

  3. java的finally简单理解

    1. 大家都知道, 普通的try, catch, finally格式: try{ //有可能会抛出异常的代码 }catch{ //抛出异常时处理的代码 }finally{ //无条件执行的代码,就不管 ...

  4. vue数组进行分组

    数组进行分组使用switch方法 <template> <v-layout> <v-card contextual-style="dark" v-if ...

  5. 利用keepalived构建高可用MySQL-HA

    关于MySQL-HA,目前有多种解决方案,比如heartbeat.drbd.mmm.共享存储,但是它们各有优缺点.heartbeat.drbd配置较为复杂,需要自己写脚本才能实现MySQL自动切换,对 ...

  6. 深入redis内部--字典实现

    redis的字典定义和实现在dict.h和dict.c文件中. 1.字典结构 typedef struct dict { dictType *type; //定义了字典需要的函数 void *priv ...

  7. [PY3]——内置数据结构(1)——列表及其常用操作

    列表及其常用操作_xmind图         about列表 列表是一个序列,用于顺序存储数据 列表分为两种:ArrayList(用数组实现).LinkedList(用链表实现) 定义与初始化 #l ...

  8. 原生JS实现旋转轮播图+文字内容切换

    废话不多说,直接上图看效果: 需求:点击左右按钮实现切换用户图片与信息: 原理:点击右侧左侧按钮,把3号的样式给2号,2号的给1号,1号的给5号,5号的给4号,4号的样式给3号,然后根据现在是第几张图 ...

  9. [转]NancyFx/Nancy

    本文转自:https://github.com/NancyFx/Nancy/wiki/Documentation Getting Started Introduction Exploring the ...

  10. [转]Http请求中Content-Type讲解以及在Spring MVC中的应用

    本文转自:http://blog.csdn.net/blueheart20/article/details/45174399 引言: 在Http请求中,我们每天都在使用Content-type来指定不 ...