[翻译] 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 ...
随机推荐
- Node.js最新Web技术栈(2016年4月)
Node.js是比较简单的,只有你有前端js基础,那就按照我的办法来吧!一周足矣,虽然这版上了es语法,但依然是可以简单写,也可以难写,参见<全栈工程师之路-Node.js>,里面讲了No ...
- mysql和mysql jdbc连接器mysql-connector-java对应关系
mysql和mysql jdbc连接器mysql-connector-java对应关系,请参考下图:来源于mysql官网
- Kafka消息重新发送
Kafka消息重新发送 1. 使用kafka消息队列做消息的发布.订阅,如果consumer端消费出问题,导致数据并没有消费,此时不需要担心,数据并不会立刻丢失,kafka会把数据在服务器的磁盘 ...
- SharePoint 2013创建应用程序时IIS端口文件夹下没文件
最近SharePoint 2007迁移到2013的时候,碰到创建应用程序时IIS端口文件夹下没文件的问题,网上找了大把的原因,终于在这里找到了解决方案: Fix: 1. Open IIS on the ...
- Python List 基础学习
list&tuple&dict list list 常见操作 初始化: list1 = [123, 'abc', 4.56, ['inner', 'list'], 7-9j] list ...
- Xshell 6 免费版本安装过程
下载 官网下载:https://www.netsarang.com/ 点击download 注册 填写下方红色方框标注的注册信息,注册类型填写“home or school use”,名字,邮箱.最后 ...
- Microsoft .NET Pet Shop 4: Migrating an ASP.NET 1.1 Application to 2.0
249 out of 297 rated this helpful - Rate this topic Gregory Leake Microsoft Corporation Alan Le, Ale ...
- 线程7--GCD的基本使用
子线程执行延时操作,执行完成后返回主线程更新界面 dispatch_queue_t queue=dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DE ...
- C#跨窗体传值
果然C#的跨窗体传值比vb难得多,vb就定义一个全局变量就ok,但是C#还要考虑到命名空间的问题 frmMain要调用LoginUI的两个值,但是在此同时,frmMain又要引用LoginUI,所以说 ...
- JVM的逃逸分析
我们都知道Java中的对象默认都是分配到堆上,在调用栈中,只保存了对象的指针.当对象不再使用后,需要依靠GC来遍历引用树并回收内存.如果堆中对象数量太多,回收对象还有整理内存,都会会带来时间上的消耗, ...