Last active
April 14, 2018 14:40
-
-
Save eSpecialized/0ca8046d2df4c8bfc4ca0528b6107aa4 to your computer and use it in GitHub Desktop.
Simple RxSwift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RxSwift | |
let bag = DisposeBag() | |
let publisher = PublishSubject<Int>() | |
publisher | |
.ignoreElements() | |
.subscribe(onCompleted: { | |
print("completed") | |
}) | |
.disposed(by: bag) | |
publisher.onNext(3) | |
publisher.onCompleted() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment