RxSwift 系列(三) -- Combination Operators

时间:2023-03-09 04:43:36
RxSwift 系列(三) -- Combination Operators

RxSwift 系列(三) -- Combination Operators

前言

本篇文章将要学习如何将多个Observables组合成一个Observable

Combination OperatorsRxSwift中的实现有五种:

  • startWith
  • merge
  • zip
  • combineLatest
  • switchLatest

startWith

Observable释放元素之前,发射指定的元素序列。更多详情

上面这句话是什么意思呢?翻译成大白话就是在发送一个东西之前,我先发送一个我指定的东西。

举个