RxEureka 0.2.2

RxEureka 0.2.2

TestsTested
LangLanguage SwiftSwift
License Unknown
ReleasedLast Release Mar 2018
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Antonin Biret.



 
Depends on:
Eureka~> 4.0
RxCocoa~> 4.0
 

RxEureka 0.2.2

RxEureka

Build Status Version License Platform

This library is a small Rx wrapper around Eureka

Table of contents:

  1. Observing row value changes
  2. Binding row value changes to variables
  3. Example app
  4. Requirements
  5. Installation
  6. Author
  7. License
  8. References

Observing row value changes

RxEureka can be used to create Observables from the value property of Eureka's rows :

let row = TextRow() { row in
     row.title = "Text Row"
     row.placeholder = "Enter text here"
   }

let disposeBag = DisposeBag()

row.rx.value
  .asObservable()
  .subscribe(onNext: { value in
    print("Row value did change to \(value)")
  })
  .disposed(by: disposeBag)

Binding row value changes to variables

With RxEureka you can also bind the Eureka's rows values to your variables :

let row = TextRow() { row in
     row.title = "Text Row"
     row.placeholder = "Enter text here"
   }

let myVariable: Variable<String?> = Variable(nil)

let disposeBag = DisposeBag()

row.rx.value
  .asObservable()
  .bind(to: myVariable)
  .disposed(by: disposeBag)

Example app

To run the example project, clone the repo, and run pod install from the Example directory first. The app usesRxSwift, RxCocoa to observe values from Eureka.

Requirements

  • Xcode 9.x
  • Swift 4.0

Installation

Cocoapods

RxEureka is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "RxEureka", "~> 0.2"

Tested with version Cocoapods 1.2.0

Carthage

RxEureka is available through Carthage. To install it, simply add the following line to your Cartfile:

github "antoninbiret/RxEureka" ~> 0.2

Please make sure you also embed the framework dependencies into your Xcode project: Eureka.framework, RxSwift.framework, RxCocoa.framework.

For details see the Carthage: Getting Started.

Tested with version Carthage 0.28.0

Author

Antonin Biret

License

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

References