Latest 0.4.0
Homepage https://github.com/DeluxeAlonso/DLAutoSlidePageViewController
License MIT
Platforms ios 10.0
Authors

Version
License
Platform
Swift 4

Demo

DLAutoSlidePageViewController

Example

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

Requirements

DLAutoSlidePageViewController requires iOS 10.0 and Swift 4.0 or above.

Installation

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

pod "DLAutoSlidePageViewController"

Usage

1) Create an instance of a DLAutoSlidePageViewController and provide it with an array of View controllers.

let firstVC = storyboard?.instantiateViewController(withIdentifier: 'FirstVC')
let secondVC = storyboard?.instantiateViewController(withIdentifier: 'SecondVC')
let pages = [firstVC, secondVC]

let pageViewController = DLAutoSlidePageViewController(pages: pages,
                                                       timeInterval: 3.0,
                                                       transitionStyle: .scroll,
                                                       interPageSpacing: 0.0)

addChildViewController(pageViewController)
containerView.addSubview(pageViewController.view)
pageViewController.view.frame = containerView.bounds

2) You can also access the UIPageControl through the pageControl property.

pageViewController.pageControl.currentPageIndicatorTintColor = UIColor.lightGray
pageViewController.pageControl.pageIndicatorTintColor = UIColor.gray
pageViewController.pageControl.backgroundColor = UIColor.clear

Author

Alonso Alvarez, [email protected]

License

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

Latest podspec

{
    "name": "DLAutoSlidePageViewController",
    "version": "0.4.0",
    "summary": "An auto slide PageViewController.",
    "description": "An auto slide PageViewController with a customizable time interval.",
    "homepage": "https://github.com/DeluxeAlonso/DLAutoSlidePageViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Alonso Alvarez": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DeluxeAlonso/DLAutoSlidePageViewController.git",
        "tag": "0.4.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "Source/DLAutoSlidePageViewController.swift"
}

Pin It on Pinterest

Share This