Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.
/ QPageViewController Public archive

[DEPRECATED] Better UIPageViewController for iOS platform.

License

Notifications You must be signed in to change notification settings

Qase/QPageViewController

Repository files navigation

Platform Swift 4.0 travis badge Carthage compatible Release License: MIT codebeat badge Qase: QPageViewController

⚠️ QPageViewController is deprecated. Quanti does not use UIKit, but uses SwiftUI instead.⚠️

QPageViewController

QPage view controller is lightweight View Controller similar to UIPageViewController, but with better delegates and reusable UIVIewControllers.

Demo

Demo

Usage Example

    func pageViewController(_ pageViewController: QPageViewController, controllerAfter controller: UIViewController?) -> UIViewController? {
        let retController:SingleViewController = reusableController()

        guard let controller = controller as? SingleViewController, let currentModel = controller.model else {
            retController.model = model[0]
            return retController
        }

        retController.model = self.nextModel(currentModel: currentModel)
        return retController

    }

    func pageViewController(_ pageViewController: QPageViewController, controllerBefore controller: UIViewController?) -> UIViewController? {
        let retController:SingleViewController = reusableController()

        guard let controller = controller as? SingleViewController, let currentModel = controller.model else {
            retController.model = model[0]
            return retController
        }

        retController.model = self.prevModel(currentModel: currentModel)
        return retController
    }

Requirements

  • Swift 4.0
  • Xcode 9
  • iOS 10.0+

Installation

Carthage

The easiest way to integrate this framework in your project is to use Carthage.

  1. Add github "Qase/QPageViewController" to your Cartfile.
  2. Run carthage bootstrap.
  3. Drag either the QPageViewController.xcodeproj or the QPageViewController.framework into your project/workspace and link your target against the QPageViewController.framework.
  4. Make sure the framework gets copied to your application bundle.

Submodules

Another option for integrating this framework is to use Git submodules.

License

QPageViewController is released under the MIT License.