Created
April 13, 2016 09:27
-
-
Save koke/d4835c510018d557835d85c5e51a3ffa 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
func traditional_setResizedImage(withURL url: NSURL) { | |
let resizedURL = photonize(url: url, forSize: frame.size) | |
let request = requestForImageUrl(resizedURL) | |
fetchData(request) { data in | |
guard let image = imageFromResponseData(data) else { | |
return | |
} | |
dispatch_async(dispatch_get_main_queue(), { | |
applyImage(image, to: self) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment