我一定很傻,但是SDWebImage
从不执行以下内容的完成处理程序:
episodeImageView?.sd_setImage(with: url, completed: { [weak self] (image, error, cacheType, url) in
print("Looped!") // NEVER!
DispatchQueue.main.async {
guard let image = self?.episodeImageView?.image else { return }
self!.episodeView.animate(image, imageAnimationDuration: 10, initialDelay: 0, shouldLoop: true)
}
})
答案 0 :(得分:0)
使用此代码
episodeImageView.sd_setImage(with: url) { (image, error, cacheType, url) in
//Your Code
}