All Projects β†’ ukitaka β†’ RxResponderChain

ukitaka / RxResponderChain

Licence: MIT License
RxResponderChain

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to RxResponderChain

RxTask
An RxSwift implementation of a command line runner.
Stars: ✭ 14 (-22.22%)
Mutual labels:  rxswift, rxswift-extensions
Xcoordinator
🎌 Powerful navigation library for iOS based on the coordinator pattern
Stars: ✭ 1,752 (+9633.33%)
Mutual labels:  rxswift, rxswift-extensions
RxApolloClient
RxSwift extensions for Apollo Client
Stars: ✭ 46 (+155.56%)
Mutual labels:  rxswift, rxswift-extensions
WWDCast
The unofficial WWDC application for iOS
Stars: ✭ 22 (+22.22%)
Mutual labels:  rxswift
RxSwift-Workshops
EL Passion - RxSwift Workshops
Stars: ✭ 41 (+127.78%)
Mutual labels:  rxswift
Monotone
An Unsplash Application for iOS.
Stars: ✭ 181 (+905.56%)
Mutual labels:  rxswift
mvvm-with-rxswift-mentoring-008
Project and source code of the iOS Dev Mentoring #008 - Test-driven MVVM with RxSwift
Stars: ✭ 45 (+150%)
Mutual labels:  rxswift
SwiftObserver
Elegant Reactive Primitives for Clean Swift Architecture #NoRx
Stars: ✭ 14 (-22.22%)
Mutual labels:  rxswift
ios-architecture-example
Architecture pattern simple examples in iOS. You can compare differences in MVC, MVP, MVVM-Delegate and MVVM-Rx for same feature
Stars: ✭ 16 (-11.11%)
Mutual labels:  rxswift
StackBarButtonItem
πŸ”² StackBarButtonItem can use BarButtonItem like StackView
Stars: ✭ 55 (+205.56%)
Mutual labels:  rxswift
MVVM-Templates
Templates for MVVM architecture for swift (based on RxSwift)
Stars: ✭ 14 (-22.22%)
Mutual labels:  rxswift
swift-boilerplate
Clean Architecture for iOS projects (Swift + Programmatically UI + MVC + RxSwift + Auto Layout Visual Format + REST + JWT)
Stars: ✭ 14 (-22.22%)
Mutual labels:  rxswift
RxEureka
This library is a small RxSwift wrapper around Eureka
Stars: ✭ 37 (+105.56%)
Mutual labels:  rxswift
RxApollo
RxSwift extensions for Apollo
Stars: ✭ 57 (+216.67%)
Mutual labels:  rxswift
Mp3ID3Tagger
🎢🎡A macOS application to edit the ID3 tag of your mp3 files. Developed with RxSwift and RxCocoa. 🎸🎼
Stars: ✭ 17 (-5.56%)
Mutual labels:  rxswift
GitTime
GitTime is GitHub Tracking App. Using ReactorKit, RxSwift, Moya.
Stars: ✭ 55 (+205.56%)
Mutual labels:  rxswift
Swift-VIPER-Rx
VIPER architecture model. Show a single class of responsibility.
Stars: ✭ 19 (+5.56%)
Mutual labels:  rxswift
Gank
A iOS Client of gank.io written in Swift4.0 and Build with RxSwift + Moya + MVVM.
Stars: ✭ 80 (+344.44%)
Mutual labels:  rxswift
RxJSON
RxSwift wrapper for JSON
Stars: ✭ 33 (+83.33%)
Mutual labels:  rxswift
MGCleanArchitecture
Clean Architecture with RxSwift & MVVM - Templates and Solutions
Stars: ✭ 156 (+766.67%)
Mutual labels:  rxswift

RxResponderChain

RxResponderChain is an extension of RxSwift, RxCocoa. It provides the way to notify Rx events via responder chain.

Usage

First, you have to create struct / class / enum represents event you want to notify using ResponderChainEvent protocol.

import RxResponder

struct LikeTweetEvent: ResponderChainEvent {
    let tweetID: Int64
}

Generate event object and pass it to bindTo (or, on, onNext … ).

final class TweetCell: UITableViewCell {
    ...

    override func awakeFromNib() {
        super.awakeFromNib()

        likeButton.rx.tap
            .map { _ in LikeTweetEvent(tweetID: self.tweet.id) }
            .bind(to: self.rx.responderChain)
            .disposed(by: disposeBag)
    }
}

Then you can receive events in classes that are on responder chain of the class sends events. For example, if you send event in UITableViewCell then you can receive them in tableView, viewController.view, viewController, viewController.navigationController, and so on.

final class TweetListViewController: UIViewController {
    ...

    override func viewDidLoad() {
        super.viewDidLoad()

        self.rx.responderChain.event(LikeTweetEvent.self)
            .flatMapFirst { e in twitterService.like(tweetID: e.tweetID) }
            .subscribe()
            .disposed(by:disposeBag)
    }
}

Requirements

RxResponderChain requires / supports the following environments:

  • Swift 4.1 / Xcode 9.3
  • iOS 9.0 or later
  • RxSwift / RxCocoa ~> 4.1

Installation

Carthage

github "ukitaka/RxResponderChain" ~> 2.0

CocoaPods

use_frameworks!
pod "RxResponderChain", "~> 2.0"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].