amoyi / SAHistoryNavigationViewController

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SAHistoryNavigationViewController

Platform Language Version License

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller.

Features

  • iOS task manager like UI
  • Launch Navigation History with Long tap action of Back Bar Button

Installation

CocoaPods

SAHistoryNavigationViewController is available through CocoaPods. If you have cocoapods 0.36.0 or greater, you can install it, simply add the following line to your Podfile:

pod "SAHistoryNavigationViewController"

Manually

Add the SAHistoryNavigationViewController directory to your project.

Usage

If you install from cocoapods, You have to write import SAHistoryNavigationViewController.

Storyboard or Xib

Set custom class of UINavigationController to SAHistoryNavigationViewController. In addition, set module to SAHistoryNavigationViewController.

Code

You can use SAHistoryNavigationViewController as self.navigationController in ViewController, bacause implemented extension UINavigationController as below codes and override those methods in SAHistoryNavigationViewController.

extension UINavigationController {
    public func showHistory() {}
    public func setHistoryBackgroundColor(color: UIColor) {}
    public func contentView() -> UIView? { return nil }
}

And you have to initialize like this.

	let ViewController = UIViewController()
	let navigationController = SAHistoryNavigationViewController()
	navigationController.setViewControllers([ViewController], animated: true)
	presentViewController(navigationController, animated: true, completion: nil)

If you want to launch Navigation History without long tap action, use this code.

	navigationController?.showHistory()

Customize

If you want to customize background of Navigation History, you can use those methods.

	navigationController?.contentView()
	navigationController?.setHistoryBackgroundColor(color: UIColor)

Requirements

  • Xcode 6.1 or greater
  • iOS7.0(manually only) or greater

Author

Taiki Suzuki, s1180183@gmail.com

License

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

About

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller.

License:MIT License


Languages

Language:Swift 81.1%Language:Shell 13.6%Language:Ruby 2.9%Language:Objective-C 1.3%Language:C 1.1%