Git Product home page Git Product logo

cycleview_oc's Introduction

CycleView_OC

  • The easiest way to use infinite-loop-view
  • 用法最简单的无限循环的图片轮播器,使用OC实现,更加便于大家的使用。

Requirements

  • iOS 5.0+

Installation

CocoaPods

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate SwiftQRCode into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '5.0'
use_frameworks!

pod 'CycleView_OC'

Then, run the following command:

$ pod install

You should open the {Project}.xcworkspace instead of the {Project}.xcodeproj after you installed anything from CocoaPods.

For more information about how to use CocoaPods, I suggest this tutorial.

如何使用CycleView

  • cocoapods导入:pod 'CycleView_OC'
  • 手动导入:
    • CycleView_OC/Classes文件夹中的所有文件拽入项目中
    • 导入主头文件:#import "CycleView_OC.h"

Usage

#import "CycleViewController.h"
//此处的协议用于监听图片被点击的事件。
@interface CycleViewController ()<PictureCycleCellDelegate>

@end

@implementation CycleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSMutableArray *arrayM = [NSMutableArray array];
    
    for (int i = 0; i < 5; ++i) {
        
        NSString *imageName = [NSString stringWithFormat:@"%02d.jpg", i + 1];
        [arrayM addObject:[UIImage imageNamed:imageName]];
    }
    //传入图片列表
    self.cycleImageList = arrayM;
}

///通过重写这个代理方法,即可进行点击图片后的交互处理.
//itemTag为图片的tag值,默认从0开始递增。
- (void)pictureCycleCellDidSelected:(NSInteger)itemTag{
	NSLog(@"被选中的item的tag值:%zd", itemTag);
}

cycleview_oc's People

Contributors

sarieltang avatar

Watchers

 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.