Skip to content

saiedkia/NavigationStack

 
 

Repository files navigation

header

navigation-stack

Twitter CocoaPods CocoaPods Travis codebeat badge

shot on dribbble: Animation

The iPhone mockup available here.

Requirements

  • iOS 10.0+
  • Xcode 10
  • swift 4.2

Installation

Just add the Source folder to your project.

or use CocoaPods with Podfile:

pod 'Navigation-stack', '~> 0.0.2'

Usage

  1. YourNavigationController inherit from NavigationStack

  2. add code to root viewViewController

override func viewDidLoad() {
    super.viewDidLoad()
    navigationController!.interactivePopGestureRecognizer?.delegate = self
  }
extension YourViewController: UIGestureRecognizerDelegate {
  func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool {
    
    if navigationController?.viewControllers.count == 2 {
      return true
    }
    
    if let navigationController = self.navigationController as? NavigationStack {
      navigationController.showControllers()
    }
    
    return false
  }
}

Licence

Navigation-stack is released under the MIT license. See LICENSE for details.

About

The project maintained by app development agency Ramotion Inc. See our other open-source projects or hire us to design, develop, and grow your product.

Twitter URL Twitter Follow

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 98.3%
  • Ruby 1.7%