[翻译] 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 ...
随机推荐
- neo4j 查询
match (p: Node {name:"城关镇"}) return p p 代表的是一个变量,Node为插入neo4j时节点类型,name后面加节点的名称
- redis-springboot-redistemplate更改序列化方式
redisTemplate 默认的序列化方式为 jdkSerializeable, StringRedisTemplate的默认序列化方式为StringRedisSerializer 可以通过手动配置 ...
- spark、hadoop集群添加节点
1.首先添加hdfs的节点,将安装包上传到服务器,设置好环境变量.配置文件按之前spark集群搭建的那里进行修改. 设置完成后,要对新节点新型格式化: # hdfs dfs namenode - ...
- 通用数据库连接池-C3PO
C3PO是一个开放源代码的JDBC数据连接池实现项目,实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展.开源项目在使用:Hibernate,Spring,MYSQL等. 下载: h ...
- C语言——<算法>_冒泡算法的使用及理解
对数组内数值进行有规则排序时,就要用冒泡算法,也是比较简单的一个算法 #include <stdio.h> #include <stdlib.h> int main() { i ...
- Tornado简介
Tornado是一个具有强大异步功能的Python Web框架. Hello World 使用pip安装tornado: pip install tornado 编写控制器: import torna ...
- [CQOI 2018]破解D-H协议
Description 题库链接 给出 \(A,B,P,g\) ,\(g\) 是 \(P\) 的原根,求出 \(A\equiv g^a\pmod{P}\) , \(B\equiv g^b\pmod{P ...
- C# 抓取网页内容的方法
1.抓取一般内容 需要三个类:WebRequest.WebResponse.StreamReader 所需命名空间:System.Net.System.IO 核心代码: view plaincopy ...
- sql中同一个表一个字段的值赋值给另一个字段
UPDATE SG_User SET DefaultOrganizationID = OrganizationID
- ASP.NET MVC4应用程序无法建立控制器的解决方案/获取自己需要的EF版本
具体错误是我建立控制器的时候出现如下图那样的错误: Unable to cast object of type 'System.Data.Entity.Core.Objects.ObjectConte ...