ZKNavigationController 0.0.2

ZKNavigationController 0.0.2

测试测试
语言语言 SwiftSwift
许可证 MIT
发布时间最新发布2016 年 7 月
SPM支持 SPM

Zachary Khan 维护。



  • ZacharyKhan

ZKNavigationController

示例

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

要求

通过 storyboard 或在 viewDidLoad() 中将您的 Navigation Controller 和模块设置为 ZKNavigationController

然后在您的 viewController 中导入 import ZKNavigationController

安装

ZKNavigationController 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile

pod "ZKNavigationController"

用法

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")
        }
    }
}

贡献

如果您想向 ZKNagivationController 贡献,请将该仓库 fork。

对于所有功能请求和错误,请提交问题。

作者

您可以在 Twitter 上联系我 -> @ZacharyKhan3

许可证

ZKNavigationController 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。