JCCNavigationController 1.0.2

JCCNavigationController 1.0.2

charsdavy维护。




JCCNavigationController

License Platform Language

Issues Cocoapod

一个集成的导航条过渡动画效果。

安装

CocoaPods

CocoaPods 是 Cocoa项目的依赖管理工具。您可以使用以下命令安装它

$ gem install cocoapods

要使用 CocoaPods 将 JCCNavigationController 集成到您的 Xcode 项目中,请在您的 Podfile 中指定它为目标

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
  # your other pod
  # ...
  pod 'JCCNavigationController'
end

然后,运行以下命令

$ pod install

安装 CocoaPods 中的任何内容后,您应该打开 {Project}.xcworkspace 而不是 {Project}.xcodeproj

有关如何使用 CocoaPods 的更多信息,我建议查阅这篇教程

使用方法

AppDelegate

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.

    self.window = UIWindow.init(frame: UIScreen.main.bounds)
    let dashboardController = IHSDashboardController.init()
    self.window?.rootViewController = JCCNavigationController.init(rootViewController: self.dashboardController!)
    self.window?.makeKeyAndVisible()

    return true
}

UITableView

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    let detailViewController : IHSCookDetailViewController = IHSCookDetailViewController.init()
    self.jccNavigationController.pushViewController(viewController: detailViewController)

    tableView.deselectRow(at: indexPath, animated: true)
}

屏幕截图

Screenshot