The Wayback Machine - https://web.archive.org/web/20200915163535/https://github.com/hryk224/CrossNavigationController
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

CrossNavigationcontroller

Move to cross using UINavigationController

CocoaPods Compatible Swift 3.0

Requirements

  • iOS 9.0+
  • Swift 3.0+
  • ARC

install

CocoaPods

Adding the following to your Podfile and running pod install:

use_frameworks!
pod "CrossNavigationcontroller"

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.

You can’t perform that action at this time.