All Projects → RxSwiftCommunity → Rxbibinding

RxSwiftCommunity / Rxbibinding

Licence: mit
Reactive two-way binding

Programming Languages

swift
15916 projects

RxBiBinding

Build Status Carthage compatible Version License Platform

Example

Binding between two ControlProperty

let disposeBag = DisposeBag()

var textFieldFirst = UITextField()
var textFieldSecond = UITextField()

(textFieldFirst.rx.text <-> textFieldSecond.rx.text).disposed(by: disposeBag)

Binding between two BehaviorRelay

let disposeBag = DisposeBag()

var textFirst = BehaviorRelay<String?>(value: "")
var textSecond = BehaviorRelay<String?>(value: "")

(textFirst <-> textSecond).disposed(by: disposeBag)

Binding between ControlProperty and BehaviorRelay

let disposeBag = DisposeBag()

var text = BehaviorRelay<String?>(value: "")
var textField = UITextField()

(textField.rx.text <-> text).disposed(by: disposeBag)

Requirements

iOS >= 10

Installation

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

pod 'RxBiBinding'

Carthage

carthage update --platform ios

Thanks

This solution is based on ReactiveCocoa (Obj-C version)

License

RxBiBinding is available under the MIT license. See the LICENSE file for more info. Copyright (c) RxSwiftCommunity

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].