debug & ifEmpty
RxSwift:
debug: Prints received events for all observers on standard output.
ifEmpty: Emits elements from the source observable sequence, or a default element if the source observable sequence is empty.
debug
: 打印接收到的所有的观察者事件
ifEmpty
: 从可观察序列中发出元素,如果可观察序列为空,则发出默认元素
这两个比较简单,就不给实例了。