This library is a small Rx wrapper around Eureka
Table of contents:
- Observing row value changes
- Binding row value changes to variables
- Example app
- Requirements
- Installation
- Author
- License
- References
RxEureka can be used to create Observable
s 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)
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)
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
.
- Xcode 9.x
- Swift 4.0
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
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
Antonin Biret
RxEureka is available under the MIT license. See the LICENSE file for more info.