RxCocoa
- Shared Sequence나 Trait 등과 같은 일반적인 iOS/macOS/watchOS & tvOS 앱 개발을 위한 Cocoa 관련 기능을 제공합니다. RxCocoa는 RxSwift 및 RxRelay를 의존합니다.
ObservableType
- 이벤트를 관찰하는 subscribe 함수가 있는 protocol 입니다. Observable이 ObservableType을 채택했습니다.
/// Represents a push style sequence.
public protocol ObservableType: ObservableConvertibleType {
func subscribe<Observer: ObserverType>(_ observer: Observer) -> Disposable where Observer.Element == Element
}
ObserverType
- 이벤트를 보내는 프로토콜입니다. Subject가 ObserverType을 채택하고 있기 때문에 이벤트를 보낼 수 있습니다.
/// Supports push-style iteration over an observable sequence.
public protocol ObserverType {
associatedtype Element
func on(_ event: Event<Element>)
}
ControlProperty
- Subject처럼 ObserverType과 ObservableType을 채택한 ControlPropertyType을 채택한 struct입니다.
- 값을 전달할 수도 있고 주입받을 수도 있습니다.
- UIKit에서 ui의 값이 변경되는 것을 감지 할 수 있습니다.
Binder
- ObserverType을 채택한 struct입니다. Binder를 통해서 값(이벤트)을 주입받을 수 있습니다.
- UIKit에서 ui에 표시되는 데이터를 변경할 수 있습니다.