[翻译] 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 ...
随机推荐
- GitBook入门(用github做出第一本书)——超详细配图说明
我最近接触到gitbook,发现它支持markdown和git,刚好把我之前在github上的笔记可以生成一本书,于是我就开始着手捣鼓gitbook,一下午的时间就弄的差不多了,说明这个东西还是挺容易 ...
- 解决Ubuntu 18.04中文输入法的问题
https://ywnz.com/linuxjc/1637.html
- UVM_INFO
文件:src/ch3/section3.5/3.5.6/get/my_model.sv 21 function void my_model::build_phase(uvm_phase phase); ...
- linux和Android的Makefile和android.mk
1. makefile 1.1 gcc的参数 -Wall: 是打开警告开关, -O: 代表默认优化,可选:-O0不优化,-O1低级优化,-O2中级优化,-O3高级优化,-Os代码空间优化. -g ...
- AutoResetEvent和ManualResetEvent理解
AutoResetEvent和ManualResetEvent用于多线程之间代码执行顺序的控制,它们继承自WaitHandle,API相同,但在使用中还是有区别的. 每次使用时虽然理解了,但由于没有去 ...
- Python——基本的方法
格式化 我们经常会输出类似'亲爱的xxx你好!你xx月的话费是xx,余额是xx'之类的字符串,而xxx的内容都是根据变量变化的,所以,需要一种简便的格式化字符串的方式 >>> 'He ...
- UEditor图片焦点错位,火狐document.body.scrollTop不管用的问题
转自 http://liyunpeng.iteye.com/blog/2068751 关于 document.body.scrollTop 在火狐浏览器中不管用的问题 看网上有人写通过判断docume ...
- SQL Server 两个时间段的差and时间截取到时分
/*--------------------------时间截取到时分-----------------------------------*/ ), ),)--返回2017-11-24 19:25 ...
- HTML中字体的垂直排列
1.源代码: <html> <head> </head> <body> <div style="font-size:18px;writi ...
- 用Lua控制Nginx静态文件的url访问权限
需求背景:比如我们有一个存储文件的web服务器,一般通过url可直接访问到:http://127.0.0.1/uploads/test.rar,如果我们需要限制别人的访问,可以通过添加lua脚本来控制 ...