【问题标题】:What does the >- operator mean in RxSwift and where is it documented?>- 运算符在 RxSwift 中是什么意思,它在哪里记录?
【发布时间】:2016-09-13 18:35:23
【问题描述】:

我在涉及 RxSwift 的各种代码片段中看到了 >- 运算符(例如 https://github.com/ReactiveX/RxSwift/issues/35),但找不到任何关于它的文档。什么意思?

这是一个例子:

combineLatest(emailIsValid, passwordIsValid)
    >- and
    >- signupButton.rx_subscribeEnabledTo
    >- disposeBag.addDisposable

【问题讨论】:

    标签: ios swift reactive-programming rx-swift reactivex


    【解决方案1】:

    >- 运算符被称为“管道转发运算符”,它在 this commit 中被删除,以支持协议扩展,一旦它们在 Swift 中成为可能。

    考虑到 Swift 的能力,这只是当时最好的方法。

    【讨论】:

      猜你喜欢
      • 2011-03-26
      • 2010-12-30
      • 1970-01-01
      • 2019-12-23
      • 2010-12-11
      • 2011-05-12
      相关资源
      最近更新 更多