IntrepidPursuits / swift-wisdom

A collection of additions to the Swift Standard Library created by Intrepid Pursuits developers
MIT License
39 stars 14 forks source link

Added missing double bind methods from RxExamples #124

Closed djbrooks111 closed 7 years ago

djbrooks111 commented 7 years ago

These two methods are in https://github.com/ReactiveX/RxSwift/blob/master/RxExample/RxExample/Operators.swift, but were missing from Wisdom.

This solves an error that Xcode would throw in the following example:

@IBOutlet weak var textView: UITextView!
var caption = Variable("")
...
textView.rx.text <-> caption // This is where Xcode would throw a "Cannot convert type" error
tzm41 commented 7 years ago

Use textView.rx.text.orEmpty <-> caption.

djbrooks111 commented 7 years ago

@tzm41's suggestion worked. @Benuuu do we still want this PR then?

Benuuu commented 7 years ago

Lets drop it then