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. 我爱Markdown (3)

    继续Markdown的常见语法, 本文将介绍: 07 - Links 链接 08 - Images 图片 09 - Blockquotes 块引用 10 - Backslash Escapes 显示保 ...

  2. [中英对照]Why Redis beats Memcached for caching | 在cache化方面,为何Redis胜过Memcached?

    对Memcached和Redis有兴趣的同学不妨花几分钟读一读本文,否则请飘过. Why Redis beats Memcached for caching | 在cache化方面,为何Redis胜过 ...

  3. windows下python2.7版本numpy,Scipy,matplotlib,sklearn安装

    系统是windows32位,安装了python2.7.13. 安装顺序就是numpy,Scipy,matplotlib,sklearn. 首先是更新一下pip (确保pip能使用) 然后将setupt ...

  4. PTA (Advanced Level) 1022 Digital Library

    Digital Library A Digital Library contains millions of books, stored according to their titles, auth ...

  5. td 不换行 隐藏显示多余的部分(转)

    转自:http://sha-tians.iteye.com/blog/1996162 table中td固定宽度后overflow:hidden不生效的问题 博客分类: html/css/js   前两 ...

  6. Spring 学习(十)--- Dispatch 分发逻辑

    问题 : Spring 分发逻辑是如何的 概述 本文讲解Spring 请求到返回视图的分发过程. 分发逻辑 分发逻辑可以使用下图来表示. 总共七个步骤 : 接收请求,经过 DispatcherServ ...

  7. zsh: command not found: gulp

    明明安装了gulp,但是为什么执行gulp命令却在控制台输出 zsh: command not found: gulp 可能因为gulp没有被全局安装 在控制台输入 which gulp 如果输出 g ...

  8. nuxt.js踩坑之 - SSR 与 CSR 显示不一致问题

    [Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This ...

  9. Vue 2.0的学习笔记:Vue的过滤器

    转自: https://www.w3cplus.com/vue/how-to-create-filters-in-vuejs.html 过滤器的介绍 1.在Vue中使用过滤器(Filters)来渲染数 ...

  10. iOS开发笔记18:一些编译、开发调试、打包的细节整理

    1.以链库的方式引用第三方库 一些特殊场景可能会要求使用链库的方式使用第三方库,大体设置如下: ①Other Linker Flags里进行设置,格式为-l+库名称 ②Libray Search Pa ...