HFNavigationController
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
s.ios.deployment_target = '9.0'
s.swift_version = "5.0"
Installation
HFNavigationController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'HFNavigationController'
Usage
import HFNavigationController
class HomeViewController: UIViewController {
//控制器弹窗
lazy var controller: NNAlertViewController = {
let controller = NNAlertViewController()
controller.view.layer.cornerRadius = 15
controller.view.layer.masksToBounds = true
return controller;
}()
//导航控制器弹窗
lazy var navController: HFNavigationController = {
let controller = HFNavigationController(rootViewController: FisrtViewController())
controller.modalPresentationStyle = .custom
controller.transitioningDelegate = controller as UIViewControllerTransitioningDelegate
return controller;
}()
// MARK: - life cycle
override func viewDidLoad() {
super.viewDidLoad()
edgesForExtendedLayout = []
title = Bundle.localizedString(forKey: "半屏显示")
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "导航控制器", style: .plain, target: self, action: #selector(handleItemRight))
}
@objc func handleItemRight() {
guard let rootViewController = UIApplication.shared.keyWindow?.rootViewController else { return }
rootViewController.present(navController, animated: true, completion: nil)
}
}
Author
shang1219178163, [email protected]
License
HFNavigationController is available under the MIT license. See the LICENSE file for more info.