Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RxSwiftCommunity/RxBiBinding
Reactive two-way binding
https://github.com/RxSwiftCommunity/RxBiBinding
Last synced: about 2 months ago
JSON representation
Reactive two-way binding
- Host: GitHub
- URL: https://github.com/RxSwiftCommunity/RxBiBinding
- Owner: RxSwiftCommunity
- License: mit
- Created: 2018-08-21T17:15:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-25T17:19:16.000Z (almost 4 years ago)
- Last Synced: 2024-11-11T18:32:19.335Z (2 months ago)
- Language: Swift
- Homepage:
- Size: 66.4 KB
- Stars: 126
- Watchers: 5
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rxswift - RxBiBinding - way binding (Libraries)
README
# RxBiBinding
[![Build Status](https://travis-ci.org/RxSwiftCommunity/RxBiBinding.svg?branch=master)](https://travis-ci.org/RxSwiftCommunity/RxBiBinding)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Version](https://img.shields.io/cocoapods/v/RxBiBinding.svg?style=flat)](https://cocoapods.org/pods/RxBiBinding)
[![License](https://img.shields.io/cocoapods/l/RxBiBinding.svg?style=flat)](https://cocoapods.org/pods/RxBiBinding)
[![Platform](https://img.shields.io/cocoapods/p/RxBiBinding.svg?style=flat)](https://cocoapods.org/pods/RxBiBinding)## Example
Binding between two ControlProperty
```swift
let disposeBag = DisposeBag()var textFieldFirst = UITextField()
var textFieldSecond = UITextField()(textFieldFirst.rx.text <-> textFieldSecond.rx.text).disposed(by: disposeBag)
```Binding between two BehaviorRelay
```swift
let disposeBag = DisposeBag()var textFirst = BehaviorRelay(value: "")
var textSecond = BehaviorRelay(value: "")(textFirst <-> textSecond).disposed(by: disposeBag)
```Binding between ControlProperty and BehaviorRelay
```swift
let disposeBag = DisposeBag()var text = BehaviorRelay(value: "")
var textField = UITextField()(textField.rx.text <-> text).disposed(by: disposeBag)
```## Requirements
iOS >= 10
## Installation
RxBiBinding is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'RxBiBinding'
```Carthage
```
carthage update --platform ios
```## Thanks
This solution is based on [ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa) (Obj-C version)
## License
RxBiBinding is available under the MIT license. See the LICENSE file for more info.
Copyright (c) RxSwiftCommunity