Skip to content

RxSwift Extension For URLNavigator(Elegant URL Routing for Swift)

License

Notifications You must be signed in to change notification settings

InsectQY/RxURLNavigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

RxSwift Extension For URLNavigator(Elegant URL Routing for Swift)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published