Rx 的概念
响应式编程 , 先看一下官方的描述
Rx is a generic abstraction of computation expressed through Observable<Element> interface.
This is a Swift version of Rx.
It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment.
Like the original Rx, its intention is to enable easy composition of asynchronous operations and event/data streams.
KVO observing, async operations and streams are all unified under abstraction of sequence. This is the reason why Rx is so simple, elegant and powerful.
翻译:
Rx 是一个通过 **Observable
KVO 观察,异步操作,数据流等都在序列抽象中被加以统一. 这是Rx系列之所以如此简洁、优雅、有效的原因