Latest 1.2.0
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, CoreGraphics, UIKit

This is an auto cycled scroll view made by objective-c,you can put any subclasses of UIView in to make it work

What this view can do?/这个视图可以干吗?

You can create a vertical auto cycled scroll view with a single initilizer.

How to use?/如何使用?

//rect of the view/控件的尺寸位置
CGRect rect = CGRectMake(0, self.view.frame.origin.y,self.view.frame.size.width, 50);

//it has to be two exactly plain views,cause objective-c can not copy UIView,even if you could copy by using archiver/unarchiver,but when your views were made by ib ,subviews of copied views wound't be initlized!!!
NSArray *contentViews = [[NSArray alloc] initWithObjects:[UIButton buttonWithType:UIButtonTypeCustom],[UIButton buttonWithType:UIButtonTypeCustom], nil];

//interval of animations/动画间隔
float intervalOfAnimation = 2;
//duration of animations/动画持久
float durationOfAnimation = 1;
//datasource for updating contentViews per scrolling
NSMutableArray *dataSource = [[NSMutableArray alloc] initWithObjects:@"data1",@"data2",@"data3",@"data4",@"data5",@"data6", nil];

//you can put any subclasses of UIView in to make them work
 _sv = [[SYVerticalAutoScrollView alloc] init:rect
                                      updator:^(UIButton *sender,
                                                NSMutableArray *data,
                                                int index) {
    //do your personal setting or updating here!
    [sender addTarget:self action:@selector(changeAction:) forControlEvents:UIControlEventTouchUpInside];
    [sender setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [sender setTitle:data[index] forState:UIControlStateNormal];

//once you add into your superview,the view was started already.
[self.view addSubview:_sv];

-(void) changeAction:(UIButton *) sender{
//dataIndex works like a pageNum,//can be used to confirm which element you clicked in dataSource.

How to install?/如何安装?

1,drag into your project.
2,pod search SYVerticalAutoScrollView ,and vim the Podfile,pod install……

how does it work?/原理

The core idea of this view actually is that two views switch each other all the time.

Latest podspec

    "name": "SYVerticalAutoScrollView",
    "version": "1.2.0",
    "summary": "A vertical auto cycled view made by objective-c/u5782u76f4u6edau52a8u89c6u56feuff0cu53efu5b9eu73b0u6dd8u5b9du5934u6761u8f6eu64adu516cu544au6548u679c",
    "description": "This is an auto cycled scroll view made by objective-c,you can put any subclasses of UIView in to make it work.(u8fd9u662fu7528objective-cu5c01u88c5u7684u4e00u4e2au5782u76f4u8f6eu64adu63a7u4ef6uff0cu53efu4ee5u5b9eu73b0u6dd8u5b9du5ba2u6237u7aefu6dd8u5b9du5934u6761u6837u7684u6548u679cu3002)",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "u65bdu52c7": "[email protected]/[email protected]"
    "source": {
        "git": "",
        "tag": "1.2.0"
    "platforms": {
        "ios": "7.0"
    "requires_arc": true,
    "source_files": "SYVerticalAutoScrollView/*",
    "frameworks": [

Pin It on Pinterest

Share This