Swiftpack.co - Package - DeluxeAlonso/DLAutoSlidePageViewController

DLAutoSlidePageViewController

Version License Platform Swift 5

Demo

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

CocoaPods

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

pod "DLAutoSlidePageViewController"

Swift Package Manager

To integrate using Swift Package Manager, add the following as a dependency to your Package.swift:

.package(url: "https://github.com/DeluxeAlonso/DLAutoSlidePageViewController.git", .upToNextMajor(from: "1.0.2"))

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
  1. 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, alonso.alvarez.dev@gmail.com

License

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

Github

link
Stars: 10

Dependencies

Used By

Total: 0

Releases

Update SPM Platforms - 2019-11-24 05:01:47

Fix SPM - 2019-11-24 04:55:56

Fix Swift Package Manager path.

Add SPM - 2019-11-24 04:47:02

Add Swift Package Manager support.

Update to Swift 5 - 2019-11-24 02:12:53

Update to Swift 4.2 - 2019-02-08 15:47:18

Update source code and examples to Swift 4.2

Scroll animation in progress handler - 2018-06-02 15:46:36

Handles the scroll animation of the page view controller to avoid non intended behaviours.

Background execution handler - 2018-05-27 16:07:50

Handles the timer when the app goes into background.

Update README.md - 2017-10-17 06:25:21

Add an Usage section to the README.

First Release - 2017-10-16 07:50:47

First release of DLAutoSlidePageViewController.