Skip to content

Instantly share code, notes, and snippets.

@llinardos
Last active May 8, 2018 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llinardos/f07b786b0bcb501071961cd1a236add9 to your computer and use it in GitHub Desktop.
Save llinardos/f07b786b0bcb501071961cd1a236add9 to your computer and use it in GitHub Desktop.
let service = SyncronousThingsService()
onMainDo({
self.activityIndicator.startAnimating()
}, onBackgroundDo: {
return service.getThings()
}, thenOnMainDo: {
self.activityIndicator.stopAnimating()
self.updateUI(with: $0)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment