Latest 0.1.1
Homepage https://github.com/wheying/GCCycleScrollView
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

GCCycleScrollView supports auto scroll and drag of imageview which can be used for Ads repeat scroll (Viwepager function) iOS. Support image data cache and clear cahce function. For each imageview you can add its title and custom set title labe property or use default title label property.

GCCycleScrollView用于iOS 广告等图片展示轮播,支持无限循环播放,以及拖拽功能.GCCycleScrollView对于每一张图片都可以添加自己的标题以及设置标题label的相关属性或者使用默认的设置。

CI Status
Version
License
Platform

Picture(图片效果)

image

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation(安装)

GCCycleScrollView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "GCCycleScrollView"

Manual Install(手动导入)

Download the Project and then drag "lib"file to your own project.首先下载该项目,把项目中的lib文件夹拉入自己的项目。

#import "GCCycleScrollView.h"

Example(例子)

=====
load local images 本地图片加载

    //load local images 本地图片加载
    GCCycleScrollView *cycleScroll = [[GCCycleScrollView alloc] initWithFrame:CGRectMake(0, 80, self.view.frame.size.width, 170)];
    cycleScroll.delegate =self;
    NSArray *images = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"3"],[UIImage imageNamed:@"1"],[UIImage imageNamed:@"5"],[UIImage imageNamed:@"2"],nil];
    cycleScroll.localImageGroups = images;
    cycleScroll.autoScrollTimeInterval = 3.0;
    cycleScroll.dotColor = [UIColor greenColor];
    [self.view addSubview:cycleScroll];

load images from website 网络图片加载

//load images from website 网络图片加载
    GCCycleScrollView *cycleScroll = [[GCCycleScrollView alloc] initWithFrame:CGRectMake(0, 300, self.view.frame.size.width, 170)];
    cycleScroll.delegate =self;
    NSArray *urlimages = [[NSArray alloc] initWithObjects:@"http://pics.sc.chinaz.com/files/pic/pic9/201603/apic19563.jpg",@"http://pics.sc.chinaz.com/files/pic/pic9/201603/apic19747.jpg",@"http://pics.sc.chinaz.com/files/pic/pic9/201603/apic19515.jpg",@"http://pics.sc.chinaz.com/files/pic/pic9/201602/apic18951.jpg",nil];
    cycleScroll.imageUrlGroups = urlimages;
    cycleScroll.autoScrollTimeInterval = 3.0;
    cycleScroll.dotColor = [UIColor greenColor];
    [self.view addSubview:cycleScroll];

clear image data cache清除图片本地缓存

//clear image data cache清除图片缓存
[cycleScroll clearCache];

pageCOntroll location; pageCOntroll的位置

//pageCOntroll location; pageCOntroll的位置
typedef NS_ENUM(NSInteger,GCCycleScrollPageControlAliment){
    /**
     *  page control 位于中间,默认在中间 center default value
     */
    GCCycleScrollPageControlAlimentCenter = 0,

    /**
     *  page control 位于右侧 right side
     */
    GCCycleScrollPageControlAlimentRight = 1,

    /**
     *  page control 位于左侧 left side
     */
    GCCycleScrollPageControlAlimentLeft = 2
};

Author

EricWan, [email protected]

License

GCCycleScrollView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "GCCycleScrollView",
    "version": "0.1.1",
    "summary": "GCCycleScrollView used for cycle scroll.",
    "description": "Can be used for cycle scroll of Ads, the images can be local or URL images.",
    "homepage": "https://github.com/wheying/GCCycleScrollView",
    "license": "MIT",
    "authors": {
        "wheying": "[email protected]"
    },
    "source": {
        "git": "https://github.com/wheying/GCCycleScrollView.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*.{h,m}",
    "resource_bundles": {
        "GCCycleScrollView": [
            "Pod/Assets/*.png"
        ]
    },
    "public_header_files": "Pod/Classes/GCCycleScrollView.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This