We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smaple 除了订阅源obs以外,还可以监视另外一个notifier 之间有源就取最新的源发送 两次noti之间如果没有源的话,就不会发送
smaple
noti
func sample(){ let disbag = DisposeBag() let source1 = PublishSubject<Int>() let noti1 = PublishSubject<String>() source1.sample(noti1) .subscribe(onNext: { print($0) },onCompleted: { print("1===completed") }).disposed(by: disbag) source1.onNext(1) //1 noti1.onNext("A") source1.onNext(2) //2 noti1.onNext("B") noti1.onNext("C") source1.onNext(3) source1.onNext(4) noti1.onNext("D") source1.onNext(5) noti1.onCompleted() /* 1 2 4 5 */ }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
smaple
除了订阅源obs以外,还可以监视另外一个notifier之间有源就取最新的源发送
两次
noti
之间如果没有源的话,就不会发送The text was updated successfully, but these errors were encountered: