[翻译] 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;

 

目录
相关文章
|
4月前
|
XML Java Android开发
Android Studio入门之文本内容、大小、颜色的讲解及实战(附源码 超详细必看)
Android Studio入门之文本内容、大小、颜色的讲解及实战(附源码 超详细必看)
46 0
|
前端开发
前端知识学习案例17vs code-选中所有出现得文本
前端知识学习案例17vs code-选中所有出现得文本
48 0
前端知识学习案例17vs code-选中所有出现得文本
|
iOS开发 vr&ar
iOS开发-获取View截图图像
在做ar的时候突然有取图的需求,小记 先指定图像的大小 UIGraphicsBeginImageContext(view.frame.size); 在指定的区域绘制图像 [view drawViewHierarchyInRect:view.
1219 0
|
Android开发 存储
Android官方开发文档Training系列课程中文版:动画视图之创建自定义转场动画
原文地址:http://android.xsoftlab.net/training/transitions/custom-transitions.html 自定义转场可以创建自定义动画。
1225 0
|
存储 Android开发 开发者
Android官方开发文档Training系列课程中文版:动画视图之转场框架介绍
原文地址:http://android.xsoftlab.net/training/transitions/index.html 引言 Activity所呈现的UI经常会由用户的输入或者其它事件而发生变化。
1146 0