來源:iThome
共 14 篇。
RxSwift 社群套件:RxGesture 與 RxSwiftExt
用 RxGesture 處理各種手勢,以及 RxSwiftExt 常用的 operator 與 Reactive Extensions。
雙向綁定與 Driver
用 RxSwiftUtilities 的 TwoWayBinding 處理表單雙向綁定,以及專為 UI 設計的 Driver。
擴充 UIKit:Binder、Reactive Extensions 與 DelegateProxy
拆解 Binder、ControlEvent、ControlProperty,並以 CLLocationManager 為例實作 DelegateProxy。
用 RxBlocking 與 RxTest 測試 ViewModel
RxBlocking、RxTest 與 Cold/Hot Observable 的觀念,並用 RxBlocking 為列表 ViewModel 寫測試。
UITableView + Rx:從綁定到 ViewModel
UITableView 的 rx.items 綁定,以及一個含下拉刷新與分頁的列表範例,從 ViewController 到 ViewModel。
Schedulers:subscribeOn 與 observeOn
Scheduler 與多執行緒,以及 subscribeOn、observeOn 分別決定哪一段在哪個執行緒執行。
Error Handling Operators
用 catchError、catchErrorJustReturn、retry 與 retryWhen 處理序列中的錯誤。
Combining Operators 與選擇指南
reduce、scan、startWith、concat、merge、combineLatest、zip、withLatestFrom 等 Combining operators,以及容易混用時怎麼選。
Share 與 ShareReplay:共享訂閱
沒有 share 時為什麼會重複訂閱、副作用執行多次,以及 share、shareReplay 與 whileConnected、forever 的差異。
Transforming Operators:map、flatMap 與 materialize
map、flatMap、flatMapLatest 的差異與使用時機,以及用 materialize 避免 error 中斷序列。
Filtering Operators
用 filter、skip、take、distinctUntilChanged 約束訂閱者收到的元素。
Subject、Relay 與使用時機
PublishSubject、BehaviorSubject、ReplaySubject 與 Relay 的差異,已棄用的 Variable,以及過度使用 Subject 的問題。
Observable 的生命週期與建立方式
Observable 的 next、error、completed 生命週期、訂閱與 DisposeBag,以及 just、from、never、empty、error、create 等建立方式。
RxSwift 探索之旅:緣起、核心觀念與學習資源
從 Observer pattern、Iterator pattern 與 Functional programming 理解 Rx,並整理安裝方式與學習資源。