CrossNavigationController 0.5.0

CrossNavigationController 0.5.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Feb 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by hryk224.




  • By
  • hyyk224

CrossNavigationcontroller

Move to cross using UINavigationController

Requirements

  • iOS 9.0+
  • Swift 3.0+
  • ARC

install

import

import CrossNavigationcontroller

Usage

  • Change UINavigationController to CrossNavigationcontroller
  • Change UIViewController to CrossViewController
  • If want to use Gesture, set CrossGestureControllable protocol at CrossViewController subclass

Move (push, pop)

func moveViewController(_ viewController: CrossViewController, direction : Cross.Direction, animated: Bool)

Cross.Direction => .up or .down or .left or right

Move to root

// UINavigationController method
func moveToRootViewController(animated: Bool) -> [UIViewController]?

Customize

If change the start coordinates

In CrossNavigationcontroller

override func viewDidLoad() {
  super.viewDidLoad()
  setUp(initialCoordinate: (X, Y))
}

If use custom transition

In CrossNavigationcontroller

override func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
  return CustomTransionAnimator()
}

License

This project is made available under the MIT license. See LICENSE file for details.