Find out how to manage threads in RxSwift and get an introduction to using timing operators to filter consecutive input.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4743-beginning-rxswift/lessons/19
Find out how to manage threads in RxSwift and get an introduction to using timing operators to filter consecutive input.
Hi Scott,
Great tutorials! I am learning a lot. One question, How is it possible to use take(5.0, MainScehdular.instance) operator with a CocoaAction?
Thanks. Here’s an example of using take
with a 5 second timer:
.take(5.0, scheduler: MainScheduler.instance)
.subscribe(onNext: { _ in
print("You tapped the button within 5 seconds")
})
.disposed(by: disposeBag)