ZKNavigationController 0.0.2

ZKNavigationController 0.0.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2016
SPMSupports SPM

Maintained by Zachary Khan.



  • By
  • ZacharyKhan

ZKNavigationController

Demo

Example

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

Requirements

Set your Navigation Controller AND module to ZKNavigationController via storyboard or in viewDidLoad().

then import ZKNavigationController in your viewController.

Installation

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

pod "ZKNavigationController"

Usage

import UIKit
import Foundation
import ZKNavigationController

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    @IBAction func showAlertButtonHandler(sender: AnyObject) {
        self.show(withIcon: true)
    }

    @IBAction func showWithoutIconHandler(sender: AnyObject) {
        self.show(withIcon: false)
    }

    func show(withIcon withIcon:Bool!) {
        if let navController : ZKNavigationController = self.navigationController as? ZKNavigationController {
            if !withIcon {
                let popupView = ZKNavigationPopupView(navigationController: navController, Icon: nil, Message: "Showing a ZKAlert")
                navController.showAlert(popupView)
            } else {
                let icon = ZKIcon(image: UIImage(named: "image"))
                let popupView = ZKNavigationPopupView(navigationController: navController, Icon: icon, Message: "Showing a ZKAlert")
                navController.showAlert(popupView)
            }
        } else {
            print("Navigation controller is not of type ZKNavigationController")
        }
    }
}

Contribution

If you would like to contribute to ZKNagivationController, please fork the repo.

For ALL feature requests and bugs, please submit an issue.

Author

You can reach me on Twitter -> @ZacharyKhan3

License

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