TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2017 |
SwiftSwift Version | 4.0 |
SPMSupports SPM | ✗ |
Maintained by Adrian Apodaca, Koldo Ruiz.
ByvModalNav
ByvModalNav is an UINavigationController with auto close button. It's developed to quickly show modal views with close button.
To run the example project, clone the repo, and run pod install
from the Example directory first.
ByvModalNav is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "ByvModalNav"
Use as a normal UINavigationController and present it modally
let nav = ByvModalNav.init(rootViewController: controller)
self.present(nav, animated: true, completion: nil)
If onlyInRoot:Bool = true
(default) the close button is added as leftBarButtonItem only in the root view controller.
To dismiss the view you must need to back to the root view on the navigation controller
If onlyInRoot:Bool = false
the close button is added as rightBarButtonItem in all view controllers.
The modal navigation can be dismiss in any view controller
Exists 3 nullable handler var
shouldDismissHandler:(() -> Bool)?
allow dismiss or not. If It's nil the view controller should be dismissed.
willDismissHandler:(() -> Void)?
It's called before the view controller is going to be dismissed
didDismissHandler:(() -> Void)?
It's called after the view controller dismissed
Adrian, [email protected]
ByvModalNav is available under the MIT license. See the LICENSE file for more info.