Nabigeta provides simple API to declare routes for navigation. Compatible with trait environments.
Why
Classic app navigation tights View Controllers together, making hard to change workflow when needed.
Magellan helps you by defining a simple routing system abstracting View Controllers usage, making it easier to introduce changes, deep linking, tagging, and so on…
Usage
1 - Declare an enum with your routes
enum AppRoutes {
case book(Book)
case cart(Cart)
}
class ViewController {
var cart: Cart!
func onCartTapped() {
navigate(to: .cart(cart))
}
}
Advanced Usage
Presentation
Magellan provides some default Presentation strategies:
PresentationPush
PresentationModal
PresentationPopover
PresentationSegue
If none of them feed your needs, you can provide your own custom presentation just by creating a class/struct implementing the PresentationStrategy protocol.
Stopping navigation
Navigate back
You can cancel navigation from source controller:
bookViewController.navigateBack() // come back to BookViewController
You can also stop navigation from destination controller:
Magellan
Nabigeta provides simple API to declare routes for navigation. Compatible with trait environments.
Why
Classic app navigation tights View Controllers together, making hard to change workflow when needed.
Magellan helps you by defining a simple routing system abstracting View Controllers usage, making it easier to introduce changes, deep linking, tagging, and so on…
Usage
1 - Declare an enum with your routes
2 - Declare your route handler
3 - Create your navigation
4 - Use it!
Advanced Usage
Presentation
Magellan provides some default Presentation strategies:
If none of them feed your needs, you can provide your own custom presentation just by creating a class/struct implementing the
PresentationStrategy
protocol.Stopping navigation
Navigate back
You can cancel navigation from source controller:
You can also stop navigation from destination controller:
You can also be notified when navigations are stopped: