RxURLNavigator 2.0.0

RxURLNavigator 2.0.0

Maintained by InsectQY, InsectQY.



 
Depends on:
URLNavigator>= 0
RxSwift~> 5.0
RxCocoa~> 5.0
 

  • By
  • Insect

RxURLNavigator

Swift Version License Platform

RxURLNavigator provides RxSwift extension for URLNavigator

Requirements

  • iOS 8.0+
  • Swift 5.0

Getting Started

First create your Navigator

let navigator = Navigator()

1. Use Subscribe

navigator.rx.push(UserURL.login.path)
.subscribe { 
    // your code
}

Or

navigator.rx.present(UserURL.login.path, wrap: UINavigationController.self)
.subscribe { 
    // your code
}

2. Also you can use Binder

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)

Installation

RxURLNavigator officially supports CocoaPods only.

Podfile

pod 'RxURLNavigator'

Import

import RxURLNavigator

Example

You can find an example app here

License

RxURLNavigator is available under the MIT license. See the LICENSE file for more info.