Skip to content

Instantly share code, notes, and snippets.

@AndreyPanov
Created May 9, 2017 14:18
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 AndreyPanov/e37b39f8da84714e08d3e0f5db577b03 to your computer and use it in GitHub Desktop.
Save AndreyPanov/e37b39f8da84714e08d3e0f5db577b03 to your computer and use it in GitHub Desktop.
func onViewLoaded() {
view?.showLoadingIndicator()
repository.getItem(
onSuccess: { [weak self] item in
self?.view?.hideLoadingIndicator()
print(item.description)
},
onError: { [weak self] error in
self?.view?.hideLoadingIndicator()
print(error.localizedDescription)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment