Latest 1.0.2
Homepage https://github.com/YouYue123/CarouselViewController
License MIT
Platforms ios 9.0, requires ARC
Authors

An ios carousel viewcontroller

Requirements

  • iOS 9.0+
  • Xcode 7.2

Installation

or use CocoaPods with Podfile:

pod ''

Usage

1) Create CarouselViewController by setting its transition style, navigation orientation and other options

     let carouselViewController = CarouselViewController(transitionStyle: .Scroll, navigationOrientation: .Horizontal, options: nil)

2) If comform update page index delegate which is used to notify current page number as below

    extension ViewController : CarouselViewControllerDelegate{

     func carouselPageViewController(didUpdatePageIndex index: Int){

        indicator.image = UIImage(named: "Dots(index+1)")

     }
   }

then set delegate

    carouselViewController.carouselViewControllerDelegate = self

3) Set carousel view’s frame and added it into current view controller

     carouselViewController.view.frame = CGRecMake(0,0,100,100)
     self.addChildViewController(carouselViewController)
     self.view.addSubview(carouselViewController.view)

4) Set carousel image number

   carouselViewController.setCarouselImage(3)

Important

Make sure the image resource is set to correct name (CarouselImage’X’,such as CarouselImage1,CarouselImage2,CarouselImage3)

Licence

CarouselViewController is released under the MIT license.
See LICENSE for details.

Latest podspec

{
    "name": "CarouselViewController",
    "version": "1.0.2",
    "summary": "Easy Pageviewcontroller with Carousel Effect.",
    "homepage": "https://github.com/YouYue123/CarouselViewController",
    "license": "MIT",
    "authors": {
        "You Yue": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/YouYue123/CarouselViewController.git",
        "tag": "1.0.2"
    },
    "source_files": "Carousel/Carousel/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This