Created
May 13, 2017 17:28
-
-
Save TheCodedSelf/df4d0eda9a73dec590353a572cd14975 to your computer and use it in GitHub Desktop.
RxSwift - Merge the results of multiple Observables
This file contains hidden or 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 Foundation | |
import RxSwift | |
let cars = Observable.from(["Nissan", "Ford", "BMW"]) | |
let tanks = Observable.from(["Tiger II", "T-44", "Panther"]) | |
let bikes = Observable.from(["Ducati", "Honda", "Kawasaki"]) | |
let landVehicles = Observable.of(cars, tanks, bikes).merge() | |
landVehicles.subscribe(onNext: { print($0) }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment