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

目录
相关文章
|
监控 测试技术 Linux
Kali Linux 无线渗透测试入门指南 第二章 WLAN 和固有的不安全性
第二章 WLAN 和固有的不安全性 作者:Vivek Ramachandran, Cameron Buchanan 译者:飞龙 协议:CC BY-NC-SA 4.0 简介 建筑越高,地基就要打得越深。
1443 0
|
SQL 算法 NoSQL
分库分表下的id唯一解决方案和实战案例
分库分表下的id唯一解决方案和实战案例
|
运维 NoSQL 算法
面试必问的 Redis:高可用解决方案哨兵、集群
面试必问的 Redis:高可用解决方案哨兵、集群
384 0
面试必问的 Redis:高可用解决方案哨兵、集群
|
监控 Java API
(币安、欧易)交易所合约网格交易策略程式开发搭建部署源码规则解析
(币安、欧易)交易所合约网格交易策略程式开发搭建部署源码规则解析
|
关系型数据库 MySQL 索引
【MySQL】order by 结果不准确的问题及解决
一 介绍   相信作为DBA 在和开发打交道的过程中,经常会遇到分页查询 order by 排序这样的需求。本文源于生产过程中的案例,5.6版本的数据库使用limit和order by 一个非唯一字段时,结果集并不总是确定的.已经确定为bug,详见:MySQL 官方的bug 提醒读者朋友注意。
1160 0
|
开发框架 移动开发 数据可视化
HaaS UI 使用 树莓派 打造自己的第一个案例
HaaS UI 使用 树莓派 打造自己的第一个案例
271 0
|
安全 PHP
如何使用PHP实现多线程操作?
如何使用PHP实现多线程操作?
325 0
|
Kubernetes 数据中心 开发者
|
数据采集 机器学习/深度学习 算法
基于python机器学习 Django的二手房交易预测及展示系统 完整代码+报告文档
基于python机器学习 Django的二手房交易预测及展示系统 完整代码+报告文档
685 0
基于python机器学习 Django的二手房交易预测及展示系统 完整代码+报告文档

热门文章

最新文章