Skip to content

Instantly share code, notes, and snippets.

@yimajo
Created May 17, 2020 10:29
Show Gist options
  • Save yimajo/1dd115d53f9558c65225b43d7f281d6f to your computer and use it in GitHub Desktop.
Save yimajo/1dd115d53f9558c65225b43d7f281d6f to your computer and use it in GitHub Desktop.
Xcode11.4.1のCombineでCombineLatestする際に一つのpublisherを使うとグリッチの出し方がえぐい
//: Playground
import Combine
let publisherA = (1...4).publisher
let publisherB = publisherA.map { $0 * 100 }
_ = Publishers.CombineLatest(publisherA, publisherB)
.print()
.sink(receiveValue: {
print("\($0),\($1).") // Q.
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment