zoukankan      html  css  js  c++  java
  • [翻译] ZFTokenField

    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.

  • 相关阅读:
    清北学堂 清北-Day1-R1-Count
    清北学堂 清北-Day1-R2-监听monitor
    LuoGu P2420 让我们异或吧
    Milk(sort+结构体)
    开门人和关门人(结构体+sort)
    python-神奇的下划线
    python-pathlib
    python-文本字符串
    python-闭包
    进制-Iterative-进制转换
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4176982.html
Copyright © 2011-2022 走看看