[翻译] DKTagCloudView - 标签云View
DKTagCloudView

效果(支持点击view触发事件):

Overview
DKTagCloudView is a tag clouds view on iOS. It can generate a random and not intersects coordinates.
DKTagCloudView是一个标签云效果的view,你可以用它来生成随机的效果,在坐标中任意散布.
How To Get Started - 如何开始
Installation with CocoaPods - 通过CocoaPods安装
$ pod search DKTagCloudView -> DKTagCloudView (1.0.0)
A tag clouds view on iOS.t can generate a random and not intersects
coordinates.
pod 'DKTagCloudView', '~> 1.0.0'
- Homepage: https://github.com/zhangao0086/DKTagCloudView
- Source: https://github.com/zhangao0086/DKTagCloudView.git
- Versions: 1.0.0 [master repo]
Edit your Podfile and add DKTagCloudView:
编辑你的Podfile,然后添加DKTagCloudView
pod 'DKCarouselView', '~> x.x.x'
Add #import "DKTagCloudView.h" to the top of classes that will use it.
添加DKTagCloudView.h类.
Create instances (Also supports xib/storyboard) :创建实例对象(也支持xib/storyboard)
DKTagCloudView *tagCloudView = [[DKTagCloudView alloc] initWithFrame:CGRectMake(0, 64,
self.view.bounds.size.width,
self.view.bounds.size.height - 64)];
[self.view addSubview:tagCloudView];
self.tagCloudView = tagCloudView;
self.tagCloudView.titls = @[
@"DKTagCloudView",
@"minFontSize",
@"maxFontSize",
@"randomColors",
@"generate",
@"UIView",
@"NSInteger",
@"Min font size",
@"Max font size",
@"DKTagCloudViewDemo",
@"This is a test"
];
Generates: 生成
[self.tagCloudView generate];
Callback 回调
[self.tagCloudView setTagClickBlock:^(NSString *title, NSInteger index) {
NSLog(@"title:%@,index:%zd",title,index);
}];
Customized: 定制
/**
* Min font size. Defautls to 14.
*/
@property (nonatomic, assign) NSInteger minFontSize; /**
* Max font size. Defaults to 60.
*/
@property (nonatomic, assign) NSInteger maxFontSize; /**
* Random text colors. Defaults to:
[
[UIColor blackColor],
[UIColor cyanColor],
[UIColor purpleColor],
[UIColor orangeColor],
[UIColor redColor],
[UIColor yellowColor],
[UIColor lightGrayColor],
[UIColor grayColor],
[UIColor greenColor],
]
*/
@property (nonatomic, copy) NSArray *randomColors;
[翻译] DKTagCloudView - 标签云View的更多相关文章
- Android自定义控件之自定义ViewGroup实现标签云
前言: 前面几篇讲了自定义控件绘制原理Android自定义控件之基本原理(一),自定义属性Android自定义控件之自定义属性(二),自定义组合控件Android自定义控件之自定义组合控件(三),常言 ...
- Python批量图片识别并翻译——我用python给女朋友翻译化妆品标签
Python批量图片识别并翻译--我用python给女朋友翻译化妆品标签 最近小编遇到一个生存问题,女朋友让我给她翻译英文化妆品标签.美其名曰:"程序猿每天英语开发,英文一定很好吧,来帮我翻 ...
- Python3.7+Django2.0.4配合Mongodb打造高性能高扩展标签云存储方案
原文转载自「刘悦的技术博客」https://v3u.cn/a_id_141 书接上回,之前有一篇文章提到了标签云系统的构建:Python3.7+jieba(结巴分词)配合Wordcloud2.js来构 ...
- Python3.7+jieba(结巴分词)配合Wordcloud2.js来构造网站标签云(关键词集合)
原文转载自「刘悦的技术博客」https://v3u.cn/a_id_138 其实很早以前就想搞一套完备的标签云架构了,迫于没有时间(其实就是懒),一直就没有弄出来完整的代码,说到底标签对于网站来说还是 ...
- 原生js文字标签云上下滚动播放
效果:http://hovertree.com/texiao/js/25/ 效果图: 代码如下: <!DOCTYPE html> <html> <head>< ...
- pycloudtag 标签云
原创,转载请标明 QQ:231469242 # -*- coding: utf-8 -*- """Python3.0 Created on Sat Nov 26 08:5 ...
- 用CSS制作伪标签云
performance testing stress testing conformance testing acceptane testing smoke testing regression te ...
- 基于纯 CSS3 技术实现美观的标签云效果
标签云是博客的标配功能,能够清晰的呈现博客的各个关键词和主题.在这个效果中,您将学习如何使用 CSS3 技术创建一个效果精美的标签云效果. 作为实验项目,使用了 CSS3 渐变,阴影和最重要的的 CS ...
- css3实践之摩天轮式图片轮播+3D正方体+3D标签云(perspective、transform-style、perspective-origin)
本文主要通过摩天轮式图片轮播的例子来讲解与css3 3D有关的一些属性. demo预览: 摩天轮式图片轮播(貌似没兼容360 最好用chrome) 3D正方体(chrome only) 3D标签云(c ...
随机推荐
- LR问题集合
LR如何解决低维不可分 特征映射:通过特征变换的方式把低维空间转换到高维空间,而在低维空间不可分的数据,到高维空间中线性可分的几率会高一些.具体方法:核函数,如:高斯核,多项式核等等. 从图模型角度看 ...
- mysql保留两位小数
--这个是保留整数位 SELECT CONVERT(4545.1366,DECIMAL); --这个是保留两位小数 ,)); --这个是截取两位,并不会四舍五入保留两位小数 );
- SpringBoot入门 (六) 数据库访问之Mybatis
本文记录学习在SpringBoot中使用Mybatis. 一 什么是Mybatis MyBatis 是一款优秀的持久层框架,它支持定制化 SQL.存储过程以及高级映射.MyBatis 避免了几乎所有的 ...
- Classpath entry org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published
sometimes when importing a maven project in eclipse, i get the following error: Classpath entry org. ...
- 常用算法3 - 字符串查找/模式匹配算法(BF & KMP算法)
相信我们都有在linux下查找文本内容的经历,比如当我们使用vim查找文本文件中的某个字或者某段话时,Linux很快做出反应并给出相应结果,特别方便快捷! 那么,我们有木有想过linux是如何在浩如烟 ...
- 比较ArrayList和LinkedList的异同
1.ArrayList是实现了基于动态数组的数据结构,而LinkedList是基于链表的数据结构: 2.对于随机访问get和set,ArrayList要优于LinkedList; 3.对于添加和删除操 ...
- eclipse编译项目:Java @Override 注解报错的解决方法
错误: 在 eclipse 的新工作空间开发项目时,出现大面积方法编译错误.鼠标放在方法名上后显示让我们去掉 @override 注解,如图: 原因: @Override 是 jdk5 引入的机制,但 ...
- 传输层协议TCP和UDP分析
分析所用软件下载:Wireshark-win32-1.10.2.exe 阅读导览 1. 分析应用TCP协议,以及TCP链接管理 2. 分析应用UDP协议 分析要求 (1)TCP部分: 学习3CDaem ...
- 移动端Web Meta标签
原文 http://blog.segmentfault.com/jianjian_532633/1190000000654839 添加到推刊 在介绍移动端特有 meta 标签之前,先简单说一下 ...
- HTML5 Form Data 对象的使用
HTML5 Form Data 对象的使用 MDN: https://developer.mozilla.org/zh-CN/docs/Web/Guide/Using_FormData_Object ...