Latest 0.5.0
Homepage https://github.com/hryk224/CrossNavigationController
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors

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.

Latest podspec

{
    "name": "CrossNavigationController",
    "version": "0.5.0",
    "summary": "Move to cross using UINavigationController.",
    "homepage": "https://github.com/hryk224/CrossNavigationController",
    "screenshots": "https://github.com/hryk224/CrossNavigationController/wiki/images/sample.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "hyyk224": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/hryk224/CrossNavigationController.git",
        "tag": "0.5.0"
    },
    "source_files": "Sources/*.{h,swift}",
    "frameworks": "UIKit",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This