Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RXSwift的merge #185

Open
platojobs opened this issue Apr 28, 2022 · 0 comments
Open

RXSwift的merge #185

platojobs opened this issue Apr 28, 2022 · 0 comments
Labels
MobileDevelopment iOS、安卓、Flutter、go

Comments

@platojobs
Copy link
Owner

platojobs commented Apr 28, 2022

let disposeBag = DisposeBag()
         
let subject1 = PublishSubject<Int>()
let subject2 = PublishSubject<Int>()
 
Observable.of(subject1, subject2)
    .merge()
    .subscribe(onNext: { print($0) })
    .disposed(by: disposeBag)
 
subject1.onNext(20)
subject1.onNext(40)
subject1.onNext(60)
subject2.onNext(1)
subject1.onNext(80)
subject1.onNext(100)
subject2.onNext(1)
@platojobs platojobs changed the title 🐶 1 Jul 22, 2022
@platojobs platojobs changed the title 1 RXSwift的merge Apr 8, 2024
@platojobs platojobs added the MobileDevelopment iOS、安卓、Flutter、go label Apr 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
MobileDevelopment iOS、安卓、Flutter、go
Projects
None yet
Development

No branches or pull requests

1 participant