Created
October 5, 2017 12:47
-
-
Save koromiko/85819122f0a76bd2d76115880e6bea24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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