Latest 1.1.2
Homepage https://github.com/dimpiax/WizardViewController
License MIT
Platforms ios 8.0
Authors

Language
Version
License
Platform

Description

Build your tutorial / description / informative screens by trivial approach.
Setup visual assets and be flexible with page delegation.
Put special views or controls on top subview, which is not scrolling.

WizardViewController

Example

_wizardVC = WizardViewController()
_wizardVC.modalTransitionStyle = .coverVertical
_wizardVC.modalPresentationStyle = .overCurrentContext

// setup page indicators
_wizardVC.pageIndicatorColors = {[unowned self] currentPageIndex in
    let value: UIColor

    if let color = self._wizardVC.getView(index: currentPageIndex)?.backgroundColor {
        var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0
        color.getRed(&r, green: &g, blue: &b, alpha: &a)

        // inverse color
        value = UIColor(red: 1-r, green: 1-g, blue: 1-b, alpha: 1)
    }
    else {
        switch currentPageIndex {
            case 1: value = .darkGray
            case 2: value = .gray
            default: value = .black
        }
    }

    return (nil, value)
}

// set views
_wizardVC.setViews([B(), B(), B()])

// or

// set view controllers
_wizardVC.setViewControllers([A(), A(), A(), A()])

// set custom view on top subview
let button = UIButton(type: .custom)
button.setTitle("skip", for: .normal)
button.sizeToFit()
button.frame.origin.y = view.bounds.height - button.bounds.height - 50
button.frame.size.width = view.bounds.width
button.addTarget(self, action: #selector(closeTutorial), for: .touchUpInside)

_wizardVC.setTop(view: button)

Installation

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

pod "WizardViewController"

Author

Pilipenko Dima, [email protected]

License

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

Latest podspec

{
    "name": "WizardViewController",
    "version": "1.1.2",
    "summary": "An abstract view controller for sliding pages.",
    "description": "Build your tutorial / description / informative screens by trivial approach.nSetup visual assets and be flexible with page delegation.nPut special views or controls on top subview, which is not scrolling.nn```swiftn_wizardVC = WizardViewController()n_wizardVC.modalTransitionStyle = .coverVerticaln_wizardVC.modalPresentationStyle = .overCurrentContextnn// setup page indicatorsn_wizardVC.pageIndicatorColors = {[unowned self] currentPageIndex inn    let value: UIColornn    if let color = self._wizardVC.getView(index: currentPageIndex)?.backgroundColor {n        var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0n        color.getRed(&r, green: &g, blue: &b, alpha: &a)nn        // inverse colorn        value = UIColor(red: 1-r, green: 1-g, blue: 1-b, alpha: 1)n    }n    else {n        switch currentPageIndex {n            case 1: value = .darkGrayn            case 2: value = .grayn            default: value = .blackn        }nn    }nn    return (nil, value)n}nn// set viewsn_wizardVC.setViews([B(), B(), B()])nn// ornn// set view controllersn_wizardVC.setViewControllers([A(), A(), A(), A()])nn// set custom view on top subviewnlet button = UIButton(type: .custom)nbutton.setTitle("skip", for: .normal)nbutton.sizeToFit()nbutton.frame.origin.y = view.bounds.height - button.bounds.height - 50nbutton.frame.size.width = view.bounds.widthnbutton.addTarget(self, action: #selector(closeTutorial), for: .touchUpInside)nn_wizardVC.setTop(view: button)n```",
    "homepage": "https://github.com/dimpiax/WizardViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Pilipenko Dima": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dimpiax/WizardViewController.git",
        "tag": "1.1.2"
    },
    "social_media_url": "https://twitter.com/dimpiax",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "WizardViewController/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This