Skip to content

Instantly share code, notes, and snippets.

@AndreyPanov
Created May 9, 2017 14:18
Show Gist options
  • 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