博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
TLTagsControl
阅读量:7043 次
发布时间:2019-06-28

本文共 1868 字,大约阅读时间需要 6 分钟。

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

转载地址:http://jpeal.baihongyu.com/

你可能感兴趣的文章
如何用IE的开发人员工具选择Iframe里面的元素
查看>>
linux 常用命令(1) grep
查看>>
第三方开发的网贷系统安全如何保障
查看>>
Java千百问_05面向对象(006)_is-a,has-a,like-a是什么
查看>>
Android SDK r20.x更新时,没有Android API的问题
查看>>
PHPWind发布新产品架构图
查看>>
GitHub学习笔记
查看>>
RecyclerView+Cardview学习探索
查看>>
python 类 五 : 多重继承的MRO顺序
查看>>
Asp.net 数据库链接字符串 备份一下
查看>>
CentOS系统安装详细步骤
查看>>
我的友情链接
查看>>
我的友情链接
查看>>
Shell脚本之测试及条件表达式简述
查看>>
JavaScript函数详解(二)
查看>>
X9BYOD集群界面展示
查看>>
WebsitePanel部署指南
查看>>
Python 字符串格式化 (%操作符)
查看>>
C++右值引用
查看>>
win7远程桌面连接不上,解决办法
查看>>