Advertisement
undeadhip

Untitled

Jan 23rd, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func getImage(imageFunc: ((Profile, UIImage?) -> Void)?) -> Void {
  2.         let manager = SDWebImageManager.sharedManager()
  3.         manager.downloadImageWithURL(self.imageUrl, options: SDWebImageOptions(0), progress: nil) { (resultImage, error, cacheType, finished, url) -> Void in
  4.             if imageFunc != nil {
  5.                 imageFunc!(self, resultImage != nil ? resultImage : UIImage(named: "profileButton"))
  6.             }
  7.         }
  8.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement