RxURLNavigator provides RxSwift extension for URLNavigator
- iOS 8.0+
- Swift 5.0
First create your Navigator
let navigator = Navigator()
navigator.rx.push(UserURL.login.path)
.subscribe {
// your code
}
Or
navigator.rx.present(UserURL.login.path, wrap: UINavigationController.self)
.subscribe {
// your code
}
If you want to use Binder, you should map to URLNavigatorPushWrap
or URLNavigatorPresentWrap
tableView.rx.modelSelected(RouterType.self)
.wrapPush(navigator, UserURL.login.path)
.bind(to: navigator.rx.push)
Or
tableView.rx.modelSelected(RouterType.self)
.wrapPresent(navigator, UserURL.login.path, wrap: UINavigationController.self)
.bind(to: navigator.rx.present)
RxURLNavigator officially supports CocoaPods only.
pod 'RxURLNavigator'
import RxURLNavigator
You can find an example app here
RxURLNavigator is available under the MIT license. See the LICENSE file for more info.