Skip to content

Instantly share code, notes, and snippets.

@AndreyPanov
Last active May 9, 2017 14:19
Show Gist options
  • Save AndreyPanov/9ffffe3d1ae13aa14ba24c3bf575f6cc to your computer and use it in GitHub Desktop.
Save AndreyPanov/9ffffe3d1ae13aa14ba24c3bf575f6cc to your computer and use it in GitHub Desktop.
func onViewLoaded() {
view?.showLoadingIndicator()
repository
.before({ [weak self] in self?.view?.hideLoadingIndicator() })
.getItem(
onSuccess: { [weak self] item in
print(item.description)
},
onError: { [weak self] error in
print(error.localizedDescription)
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment