NavigatorSwift is a lightweight library which allows you not to be crazy with navigation in UIKit, but stay flexible.
Define an object which conform NavigationProvider
protocol or use standart WindowNavigationProvider()
. Instantiate Navigator(rootProvider:)
. If you want to go forward use Presentable
protocol, by default UIViewController
conform the protocol.
let rootProvider = WindowNavigationRootProvider()
rootProvider.setWindow(window) // async set window
let navigator = Navigator(rootProvider: rootProvider)
navigator.navigate(to: .present(SomeViewController()), animated: true, completion: { print("Done") })
navigator.navigate(to: .present(SomeScreen(id:)))
Also you can make a chain:
navigator.navigate(with: [
.setRoot(TabsScreen()),
.setTab(TabsScreen.TabItem.profile.rawValue),
.push(WalletScreen()),
.present(Transaction(id:)),
])
navigator.navigate(with: [
.dismissOnRoot,
.setTab(0),
.popToRoot,
])
ReactSwift supports iOS 9 and up, and can be compiled with Swift 4.2 and up.
The ReactSwift package URL is:
`https://github.com/alobanov11/NavigatorSwift`
NavigatorSwift is licensed under the Apache-2.0 Open Source license.
You are free to do with it as you please. We do welcome attribution, and would love to hear from you if you are using it in a project!
link |
Stars: 0 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics