How to use completion block using SDWebImage in Swift 3.0?

后端 未结 5 1384
孤城傲影
孤城傲影 2021-01-04 12:35

Am using SDWebImage to download image. I want to do further operation if image is downloaded successfully.

cell.appIcon.sd_setImage(with: url, placeholderIma         


        
5条回答
  •  迷失自我
    2021-01-04 13:14

    This one also works with swift 3 :

    cell.appIcon.sd_setImage(with: url, placeholderImage: UIImage(named: "App-Default"), options: []) { (image, error, imageCacheType, imageUrl) in
                // Perform your operations here.
    }
    

提交回复
热议问题