Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created November 13, 2017 03:28
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 koromiko/26bd480bbaec34a5a5736a9a05318aec to your computer and use it in GitHub Desktop.
Save koromiko/26bd480bbaec34a5a5736a9a05318aec to your computer and use it in GitHub Desktop.
func initFetch() {
self.isLoading = true
apiService.fetchPopularPhoto { [weak self] (success, photos, error) in
self?.isLoading = false
if let error = error {
self?.alertMessage = error.rawValue
} else {
self?.processFetchedPhoto(photos: photos)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment