Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created October 5, 2017 12:47
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/85819122f0a76bd2d76115880e6bea24 to your computer and use it in GitHub Desktop.
Save koromiko/85819122f0a76bd2d76115880e6bea24 to your computer and use it in GitHub Desktop.
init( apiService: APIServiceProtocol ) {
self.apiService = apiService
initFetch()
}
func initFetch() {
self.isLoading = true
apiService.fetchPopularPhoto { [weak self] (success, photos, error) in
self?.processFetchedPhoto(photos: photos)
self?.isLoading = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment