[翻译] TLTagsControl
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的更多相关文章
- 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...
- 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...
- [翻译]开发文档:android Bitmap的高效使用
内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...
- 【探索】机器指令翻译成 JavaScript
前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...
- 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...
- 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...
- 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...
- 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?
0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...
- ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点
在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...
随机推荐
- 查看tomcat部署的项目名
Myeclips的查看方法 项目名右键-->properties-->Myeclips-->deployment 这里虽然可以改这个路径的项目名 但是一般不建议更改 避免出现未知错误 ...
- Git学习系列之Git基本操作克隆项目(图文详解)
不多说,直接上干货! 想必,能进来看我写的这篇博文的朋友,肯定是了解过. 比如SVN的操作吧,最常见的是 检出(Check out ...), 更新 (Update ...), 以及 提交(Commi ...
- Win10上使用Linux Subsystem配置cuckoo sandbox
原文连接:https://www.trustwave.com/Resources/SpiderLabs-Blog/Cuckoo--Linux-Subsystem--Some-Love-for-Wind ...
- java并发编程(10)Fork/Join
Fork/Join JAVA7中出现的Fork/Join,类似于分布式文件系统hadoop的mapreduce思想,就是将任务分割,再分割,直到分割到满足条件 为了便于理解:编程逻辑可以借用 递归的思 ...
- Nginx Open File Cache
Nginx 的 open_file_cache 相关配置可以缓存静态文件的元信息,在这些静态文件被频繁访问时可以显着提升性能. 被缓存的文件元信息包括: fd,文件被打开一次后,fd保留使用 size ...
- css3 响应式布局 Media Query
1.什么是响应式布局? 响应式布局是Ethan Marcotte在2010年5月份提出的一个概念,简单说就是一个网站能够兼容多个终端. 2.响应式布局的优缺点? 优点:面对不同分辨率设备灵活性强,快捷 ...
- 配置JDK1.7开发环境
学习java知识,首先要安装jdk来配置开发环境和java运行环境,本文介绍一下JDK配置流程和验证配置成功的方法. 一.配置JDK 1.首先下载jdk1.7压缩包并解压到D盘. 2.我的电脑--右键 ...
- Oracle数据库的监控及数据维护
目前Oracle数据库的管理,数据查询等都需要安装Oracle软件或安装Oracle Client等,远程访问都需要先登录到服务器等繁琐的操作.如果是开发团队,那么每个开发,测试,管理人员都要经历这个 ...
- JDBC处理事务
一.什么是事务? 在人员管理系统中,你删除一个人员,你即需要删除人员的基本资料,也要删除和该人员相关的信息,如信箱,文章等等,这样,这些数据库操作语句就构成一个事务! 二.事务是必须满足4个条件(AC ...
- 洛谷P4781 【模板】拉格朗日插值(拉格朗日插值)
题意 题目链接 Sol 记得NJU有个特别强的ACM队叫拉格朗,总感觉少了什么.. 不说了直接扔公式 \[f(x) = \sum_{i = 1}^n y_i \prod_{j \not = i} \f ...