IOS๐/RxSwift
[RxSwift] Filtering Operator (distinctUntilChanged)
Jouureee
2022. 5. 10. 00:13
DistinctUntilChanged
์ฐ๋ฌ์ ๊ฐ์ ๊ฐ์ด ์ค๋ฉด ์๋ตํ๋ค.
Observable.of(1, 2, 2, 1, 3)
.distinctUntilChanged()
.subscribe(onNext: {
print($0)
})
.disposed(by: disposeBag)
/* Prints :
1
2
1
3
/*