Giter Club home page Giter Club logo

cycleview's Introduction

CycleView

  • The easiest way to use infinite-loop-view
  • 用法最简单的无限循环的图片轮播器

Requirements

  • iOS 7.0+
  • Xcode 6.3.1

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 CycleView into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '8.0'
use_frameworks!

pod 'CycleView'

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'
  • 手动导入:
    • CycleView/CycleView/Source文件夹中的所有文件拽入项目中
    • 导入主头文件:#import "CycleView.h"

Usage

Swift

Regular

import CycleView

class className : PictureCycleController{
    
    //override loadView function
    //重写loadViewe方法
    override func loadView() {
        super.loadView()
    }
    
    var arrayM: [UIImage]?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        //input an Array with UIImage
        //传入一个UIImage的图像数组
        CycleImageList = arrayM;
    }
    
}

Special

import CycleView

class AnimatorViewController: CycleAnimatorViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        var arrayM = [UIImage]()
        for var i = 0; i < 16; ++i {
            let imageName = String(format: "%02d.jpg", i + 1)
            arrayM.append(UIImage(named: imageName)!)
        }
        AnimatorImageList = arrayM;
        
        //you can modify the animation effect by enumeration type
        //可以通过枚举类型,修改动画效果
        AnimationType = SRTransitionAnimateType.CUBE.rawValue
        //you can change image's contentMode
        //可以设置图片填充模式
        AnimatorImageView!.contentMode = UIViewContentMode.ScaleAspectFit
    }
}

##Screenshot

常规图片轮播器
  • image
立体旋转效果
  • image
淡入淡出效果
  • image
平面翻转效果
  • image
翻页效果
  • image
反向翻页效果
  • image
横向推出效果
  • image
从上层抽出效果
  • image
水滴效果
  • image
从角落收起效果
  • image

cycleview's People

Contributors

sarieltang avatar

Watchers

James Cloos avatar junliu 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.