Last active
May 3, 2020 20:38
-
-
Save masliukivskyi/73f55455d7b138af45a6392cbfffcf0f to your computer and use it in GitHub Desktop.
Basics of Combine
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
subject | |
.handleEvents( | |
receiveSubscription: { (subscription) in | |
print("Received a subscription: \(subscription)") | |
}, receiveOutput: { (output) in | |
print("Received an output: \(output)") | |
}, receiveCompletion: { (completion) in | |
switch completion { | |
case .finished: | |
print("Finished with success") | |
case .failure(let error): | |
print("Finished with an error \(error)") | |
} | |
}, receiveCancel: { | |
print("Received a cancel") | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment