Skip to content

Instantly share code, notes, and snippets.

@MylesCaley
Last active June 28, 2017 22:16
Show Gist options
  • Save MylesCaley/0c3394667aab344cc92eb9e0bc674d03 to your computer and use it in GitHub Desktop.
Save MylesCaley/0c3394667aab344cc92eb9e0bc674d03 to your computer and use it in GitHub Desktop.
//this takes a list of items in an array, then runs an observable on each of them, finally it combines
//all of the outputs into one observable which returns all of the media items at once
Observable.combineLatest(mediaItems.map({ $0.getMediaMetadataObservable() })).subscribe(onNext: { a in
for item in a {
print (item.type)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment