TLTagsControl

https://github.com/ali312/TLTagsControl#tltagscontrol

A nice and simple tags input control for iOS.

You are able to easily setup different colors for control elements and set different displaying modes

一个简单的便签控件.

你可以很容易的给便签设置不同的颜色或者是不同的显示样式.

Switching between displaying modes

在不同的样式中切换

You are able to switch between displyaing modes by setting the mode property

你可以用mode属性来设置便签的显示样式.

@property (nonatomic) TLTagsControlMode mode;

TLTagsControl has two displaying modes

TLTagsControl有两种显示样式

TLTagsControlModeEdit,

This mode allows user to input new tags and delete tags that are already presented.

In this mode control will look like below:

一种有取消"x"标志的样式,看起来效果如下:

TLTagsControlModeList,

This mode allows only listing of already presented tags

In this mode control will look like below:

一种是纯粹显示文本的效果,如下:

Setting different colors of control elements

You are able to change colors of different element by setting these prperties

你可以设置这个控件不同元素上面的颜色,比如字体颜色,背景色等

@property (nonatomic, strong) UIColor *tagsBackgroungColor;
@property (nonatomic, strong) UIColor *tagsTextColor;
@property (nonatomic, strong) UIColor *tagsDeleteButtonColor;

Applying changes

To apply your changes you should call the method below

如果要执行变化,请调用以下方法.

- (void)reloadTagSubviews;
Example:
//assuming tagControl will be set initialized from stroryboard
@interface ViewController () @property (nonatomic, strong) IBOutlet TLTagsControl *tagControl; @end .... @implementation ViewController - (void)viewDidLoad {
[super viewDidLoad]; UIColor *blueBackgroundColor = [UIColor colorWithRed:75.0/255.0 green:186.0/255.0 blue:251.0/255.0 alpha:1];
UIColor *whiteTextColor = [UIColor whiteColor]; self.tagControl.tagsBackgroungColor = blueBackgroundColor;
self.tagControl.tagsDeleteButtonColor = whiteTextColor;
self.tagControl.tagsTextColor = whiteTextColor; self.tagControl.mode = TLTagsControlModeList; [self.tagControl reloadTagSubviews];
} @end

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

  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. utf8 和 UTF-8 在使用中的区别

    在使用中常常遇到utf-8和utf8,现在终于弄明白他们的使用不同之处了,现在来和大家分享一下,下面我们看一下utf8 和 UTF-8 有什么区别 “UTF-8”是标准写法,php在Windows下边 ...

  2. 【es6】let和const

    let 1.不存在变量提升      es5中var和function都存在变量提升,但let声明的变量不存在.     在代码块内,使用let命令声明变量之前,该变量都是不可用的.这在语法上,称为“ ...

  3. Android进程管理

    1.进程按照优先级分为不同的等级FVSBE Foreground process前台进程:用户可看到进程里某个activity界面(可以获得焦点的) Visible process可见进程:用户仍可见 ...

  4. Zepto自定义模块打包构建

    文章转自 http://www.chengxuyuans.com/web_technology/zeptojs-build.html zepto.js 是个好东西,遵循 jQuery API,但比 j ...

  5. WPF UpdateSourceTrigger属性

    TextBox中的变化并不是立即传递到源,而是在TextBox失去焦点后,源才更新.这种表现由绑定中的UpdateSourceTrigger属性来控制.它的默认值是Default,源会根据你绑定的属性 ...

  6. 令狐冲和TCP/IP协议的第三层协议的关系(经典)

    今天突然想起来去看了看我以前在csdn的博客,发现一篇以前一直被奉为经典的文章,哈哈,再转过来和大家看看:              令狐冲十四岁那年进入华山,那年岳琳珊八岁,岳不群白天给两人指点剑法 ...

  7. 关于ActiveX在WebBrowser不加载问题

    最近在做电子面单打印,需要在CS端集成web,这里我使用了WebBrowser,下文简称“wb”. wb可以简单的理解为IE的阉割版,它是支持ActiveX的,首先要确保ActiveX在IE中正常安装 ...

  8. JS类型和类 小记录

    七种数据类型 number 记住二进制是0b开头 八进制0开头,后来ES5添加了0o开头 十六进制是0x开头 string var s = ' + ' // 无回车符号 或 var s = ` ` / ...

  9. 微信小程序 c#后台支付结果回调

    又为大家带来简单的c#后台支付结果回调方法,首先还是要去微信官网下载模板(WxPayAPI),将模板(WxPayAPI)添加到服务器上,然后在打开WxPayAPI项目中的example文件下的 Nat ...

  10. python爬虫实战(八)--------知乎

    相关代码已经修改调试成功----2017-4-22 一.说明 1.目标网址:知乎登入后的首页 2.实现:如图字段的爬取 zhihu_question表: zhihu_answer表: 3.数据:存放在 ...