zoukankan      html  css  js  c++  java
  • [翻译] DKTagCloudView

    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;
  • 相关阅读:
    数据中台的“自动化数据治理”时代已来
    如何利用缓存机制实现JAVA类反射性能提升30倍
    快速入门开发实现订单类图片识别结果抽象解析
    Nginx专题(1):Nginx之反向代理及配置
    Github 上热门的 Spring Boot 项目实战推荐
    设计模式之命令模式(二)
    设计模式之命令模式(一)
    设计模式之单例模式(二)
    设计模式之单例模式(一)
    好的学习带给我什么
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4116125.html
Copyright © 2011-2022 走看看