Latest 1.0.2
Homepage https://github.com/hwj4477/ViewControllerPager
License MIT
Platforms ios 8.1
Authors

Platform
Language
License

Screenshot

Installation

CocoaPods

In your Podfile:

pod "ViewControllerPager"

And in your *.swift:

import ViewControllerPager

Usage

set Delegate

class ViewController: ViewControllerPagerDelegate, ViewControllerPagerDataSource {

    @IBOutlet weak var viewControllerPager: ViewControllerPager!

    override func viewDidLoad() {
        super.viewDidLoad()

        viewControllerPager.dataSource = self
        viewControllerPager.delegate = self

        viewControllerPager.reloadPages()
    }
}

ViewControllerPagerDataSource

// set pages
func pageViewController(_ viewControllerPager: ViewControllerPager, index: Int) -> PageViewController?
func pageCount(_ viewControllerPager: ViewControllerPager) -> Int

ViewControllerPagerDelegate

// page change event
@objc optional func didAppearPage(_ viewControllerPager: ViewControllerPager, index: Int)
@objc optional func didDisAppearPage(_ viewControllerPager: ViewControllerPager, index: Int)

Functions

// be returned PageViewController for reuse
func dequeueReuseablePageWithIdentifier(_ identifier: String) -> PageViewController?

Latest podspec

{
    "name": "ViewControllerPager",
    "version": "1.0.2",
    "summary": "iOS ViewController Pager",
    "description": "This library is similar to the Android ViewPager style.",
    "license": "MIT",
    "homepage": "https://github.com/hwj4477/ViewControllerPager",
    "authors": {
        "wjhong": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hwj4477/ViewControllerPager.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "8.1"
    },
    "source_files": "ViewControllerPager/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This