Latest 0.2.2
Homepage https://github.com/snit-ram/MultiPageController
License MIT
Platforms ios 9.0
Authors

Version
License
Platform

Component inspired by UIPageController that allows fast navigation by scrolling to switch to a different ViewController.
ViewControllers are lazily instantiated the first time it gets activated.

An item gets automatically selected if the user stop scrolling, or the user can tap an element o select it.

MultiPageViewController Image

Example

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

Requirements

  • iOS >= 9.0
  • Swift 3.0

Installation

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

pod "MultiPageController"

Usage

Set the MultipageController’s datasource and reload it’s data:

let multipageController = MultipageController()
multipageController.dataSource = self
multipageController.reloadData()

MultiPageControllerDataSource Methods

/*
* Returns the number of items to be presented when scrolling
*/
func numberOfItems(in: MultiPageController) -> Int

/*
* Returns a view to be used as preview of the item the user can select. 
* This is called only once per element.
*/
func multiPageController(_ multiPageController: MultiPageController, viewControllerAt index: Int) -> UIViewController

/* 
* Returns the view controller to be presented when the user taps selects an element. 
* This is called once the user first selects the element at the specified index
*/
func multiPageController(_ multiPageController: MultiPageController, previewViewAt index: Int) -> UIView

Author

Rafael Martins, [email protected]

License

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

Latest podspec

{
    "name": "MultiPageController",
    "version": "0.2.2",
    "summary": "UIPageController-like component that allows fast navigation by horizontal scrolling",
    "description": "Component inspired by UIPageController that allows fast navigation by scrolling to switch to a different ViewController. nViewControllers are lazily instantiated the first time it gets activated.nAn item gets automatically selected if the user stop scrolling, or the user can tap an element o select it.",
    "homepage": "https://github.com/snit-ram/MultiPageController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Rafael Martins": "[email protected]"
    },
    "source": {
        "git": "https://github.com/snit-ram/MultiPageController.git",
        "tag": "0.2.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "MultiPageController/Source/**/*",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "user_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    }
}

Pin It on Pinterest

Share This