Skip to content

Frog-Frog/PageMaster

Repository files navigation

PageMaster

Description

PageMaster is a wrapper class for easier use of UIPageViewController.

Feature

  • Easier than UIPageViewController
  • Infinite paging

Requirements

  • iOS 8.0+
  • Xcode 10.1+
  • Swift 4.2+

Demo

PageMaster

Usage

Setup

import PageMaster

private let pageMaster = PageMaster([])

private func setupPageMaster() {
    self.pageMaster.pageDelegate = self
    let vcList: [UIViewController] = [ /** Set your UIViewControllers */ ]
    self.pageMaster.setup(vcList)
    self.addChild(self.pageMaster)
    self.view.addSubview(self.pageMaster.view)
    self.pageMaster.view.frame = self.view.bounds
    self.pageMaster.didMove(toParent: self)
}

PageDelegate

extension ViewController: PageMasterDelegate {

    func pageMaster(_ master: PageMaster, didChangePage page: Int) {
	// Here you can create a process after changing the page.
    }
}

Install

CocoaPods

Add this to your Podfile.

pod 'PageMaster'

Carthage

Add this to your Cartfile.

github "PKPK-Carnage/PageMaster"

Help

If you want to support this framework, you can do these things.

  • Please let us know if you have any requests for me.

    I will do my best to live up to your expectations.

  • You can make contribute code, issues and pull requests.

    I promise to confirm them.

Licence

MIT

Author

PKPK-Carnage🦎

About

PageMaster is a wrapper class for easier use of UIPageViewController.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published