Git Product home page Git Product logo

zoecycleview's Introduction

ZOECycleView

###How To Use/如何使用 #####import "ZOECycleView.h" ####+method

 +(instancetype)ZOECycleViewWithFrame:(CGRect)rect andImages:(NSArray *)images cycleTimes:(NSInteger)times selectAtCell:(selectItem)callBack;

####-method

    ZOECycleView *view = [[ZOECycleView alloc]initWithFrame:CGRectMake(0, 0, 320, 200)];
    [view setImageGroup:arrayM];
    [view setTimer:2];
    [view setTitleGroup:arrayT];
    [view didSelectCell:^(NSInteger selectNumber) {
        NSLog(@"%tu",selectNumber);
    }];
    [view setTitleColor:[UIColor redColor]];
    [view setTitleTextColor:[UIColor yellowColor]];
    [self.view addSubview:view];

####5.11更新-全新设计的imageGroup,支持多种NSString/URL/UIImage混合投入,新增scrollDirection属性控制滚动方向,针对URL设计了沙盒存储机制以及全类型图片缓存机制,内置了专供下载缓慢的noImage.jpg,便捷更换自定义占位图片,经过了大量的内存测试

    NSMutableArray *arrayM = [NSMutableArray array];
    NSString *name = [NSString stringWithFormat:@"01"];
    NSString *path = [[NSBundle mainBundle]pathForResource:name ofType:@"jpg" inDirectory:@"images"];
    [arrayM addObject:path];
    [arrayM addObject:@"http://a2.qpic.cn/psb?/V11jri623txyVG/tpLqOxzDLpZeXKkLbf0Nt0dk*Ku5VLpBk1SvEfkV9y0!/b/dLQvgm8dDAAA&bo=FAFYAQAAAAAFAG8!&rf=viewer_4"];
    NSURL *url = [NSURL URLWithString:@"http://a2.qpic.cn/psb?/V11jri623txyVG/MIxJ7H7FS.uKVuu0xT2q.FU2H1oM4MVYBEwJ8xzlfzU!/b/dG6Qem8vDAAA&bo=cAGmAQAAAAAFAPU!&rf=viewer_4"];
    [arrayM addObject:url];
    [arrayM addObject:@"02"];
    ZOECycleView *view = [[ZOECycleView alloc]initWithFrame:CGRectMake(0, 0, 320, 200)];
    [view setImageGroup:arrayM];
    [view setTimer:2];
    [view didSelectCell:^(NSInteger selectNumber) {
        NSLog(@"%tu",selectNumber);
    }];
    [view setScrollDirection:CycleScrollDirectionLeft];
    [view setTitleColor:[UIColor redColor]];
    [view setTitleTextColor:[UIColor yellowColor]];
    [self.view addSubview:view];

#####warning/注意

  • if use TitleGroup
  • TitleGroup count == ImageGroup
  • if you need to modify the Label, please go to the "ZOECollectionViewCell.h"
  • ImageGroup.count >= 3
  • 如果使用了标题数组,则标题数组的大小必须与图片数组大小一致,并且图片数组不可以小于3
  • 如果需要修改Label,请前往“ZOECollectionViewCell.h”
  • 如果使用中遇到问题请邮件[email protected]

zoecycleview's People

Contributors

futsukai avatar

Watchers

gryphon avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.