RxSwift、RxBlocking、RxTest初尝试
在Android开发上,RxJava已经是非常重要的组成之一。最近在用Swift开发iOS应用,考虑在架构设计上使用RxSwift。 添加依赖 # Podfile use_frameworks! target 'YOUR_TARGET_NAME' do pod 'RxSwift', '~> 5' pod 'RxCocoa', '~> 5' pod 'RxBlocking', '~> 5' end # RxTest and RxBlocking make the most sense in the context of unit/integration tests target 'YOUR_TESTING_TARGET' do pod 'RxTest', '~> 5' end 创建 Observable import RxSwift ... let observable = Observable<Int>.create { (observer) -> Disposable in observer.onNext(1) observer.onComp...












