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. tomcat无法登录

    最近开始学JEE,在配置环境时,使用了tomcat 7.x的版本,然而点击manager app时无法登录. 按照网络上的教程(如:http://www.oschina.net/question/19 ...

  2. phpqrcode实现二维码(含图片)

    ---恢复内容开始--- 1,http://phpqrcode.sourceforge.net/ 下载 2,解压以后只需要一个文件 3,原生php测试: <?php include 'phpqr ...

  3. Java网络编程(二)关于Socket的一些个人想法

    1.Socket之间是如何通信的? 1.1 通信是要两两之间进行的所以应该有至少一个客户端(Client)和一个服务器端(Server),一般来说都是多个c端对一个s端---c\s 1.2 在客户端: ...

  4. 解决windows10下总是很快自动黑屏进入睡眠问题

    在用win10的过程中总是过几分钟不操作电脑,就自动黑屏睡眠了. 下面讲解一下如何解决这个问题: 第一步:win +r  输入regedit.exe 运行注册表管理器 第二步:定位到 HKEY_LOC ...

  5. orcale 之游标的属性

    无论是显式游标还是隐式游标都会有四个属性分别是:%ISOPEN.%FOUND.%NOTFOUND.%ROWCOUNT 下面我们分别对着几种属性进行分析. %FOUND 该属性表示当前游标是否指向有效的 ...

  6. ubuntu 16.04安装好后没声音的解决方法

    刚安装好Ubuntu16.04 后没声音,找了好多方法都不行,看到网上说通过安装pavucontrol和alsamixer调节解决,最后无意发现一个方法,总算是可以用了,在此记录一下.可能有的可以解决 ...

  7. elasticsearch 6.x 安装与注意

    1. 下载,解压 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gztar -zx ...

  8. 更改SQLServer实例默认字符集

    转自http://www.cnblogs.com/fygh/archive/2012/05/15/2501598.html 需求 安装数据库时,将字符集安装成了“SQL_Latin1_General_ ...

  9. 怎样求逆序对数(Inverse Number)?

    #返回上一级 @Author: 张海拔 @Update: 2014-01-14 @Link: http://www.cnblogs.com/zhanghaiba/p/3520089.html /* * ...

  10. 五:SpringCloud-Zuul

    九:zuul路由网关 1.概述 1.1 是什么 Zuul包含了对请求的路由和过滤两个最主要的功能: 其中==路由功能==负责将外部请求转发到具体的微服务实例上,是实现外部访问统一入口的基础. 而==过 ...