Latest 0.1.1
Homepage https://github.com/iaaqib/AHCarouselViewController
License MIT
Platforms ios 9.0
Authors

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

Example

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

Requirements

Installation

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

pod "AHCarouselViewController"

Is installing pod too much work? Just download the repo, copy and paste AHCarouselViewController.swift in your project.

Usage

Using AHCarouselViewController is pretty simple.

//If using pod, import AHCarouselViewController
        //Create and object 
        let carousel = AHCarouselViewController(self.view.frame, carouselImages: --image array goes here--)
        //Auto animate default time is 1 sec
        carousel.carouselAnimation = true
        //Change animation duration
        carousel.carouselAnimationTimeInterval = 4
        //Change Page Indicator color
        carousel.pageIndicatorTintColor = UIColor.black
        carousel.currentPageIndicatorTintColor = UIColor.white
        //Hide Page Indicator
        carousel.isPageIndicatorHidden = true
        //Delegate
        carousel.delegate = self

Protocol

Conform your class to protocol AHCarouselDelegate

    //Get you the number of page you are currently on
    func carouselDidChange(carouselViewController: AHCarouselViewController, carousel: carouselView) {
        let pageWidth = carousel.frame.size.width
        let page = carousel.contentOffset.x / pageWidth
        print(page)
    }

Result

alt tag

Author

Aaqib Hussain, [email protected]

License

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

Latest podspec

{
    "name": "AHCarouselViewController",
    "version": "0.1.1",
    "summary": "A simple carousel library written in Swift 3.",
    "description": "AHCarouselViewController Provides you the ability to create your image slider with few lines of code.",
    "homepage": "https://github.com/iaaqib/AHCarouselViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Aaqib Hussain": "[email protected]"
    },
    "source": {
        "git": "https://github.com/iaaqib/AHCarouselViewController.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "AHCarouselViewController/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This