kylelol / CHImageScroller

Simple, horizontal image scroller

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CHImageScroller

[![CI Status](http://img.shields.io/travis/Connor Hailey/CHImageScroller.svg?style=flat)](https://travis-ci.org/Connor Hailey/CHImageScroller) Version License Platform

Usage

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

CHImageScroller requires only 4 lines of code to implement:

The first line should be an array of images that you want presented

let images = NSArray(objects: UIImage(named: "barca")!, UIImage(named: "bayern")!, UIImage(named: "united")!)

The second line initializes the scroller with the array of images and the desired frame (should be full screen)

let imageScroller = CHImageScroller(images: images, frame: CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height))

In the third, you add the imageScroller as a subview of your current view controller's view'

self.view.addSubview(imageScroller)

In the fourth, you present the imageScroller

imageScroller.presentImagePreview()

Requirements

Installation

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

pod "CHImageScroller"

Author

Connor Hailey, connorhailey@gmail.com

License

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

About

Simple, horizontal image scroller

License:MIT License


Languages

Language:Shell 56.0%Language:Swift 33.0%Language:Ruby 7.3%Language:Objective-C 3.7%