SDWebImage: Crash in swift, when I use self.xxxx in the completed block
self.imageView.sd_setImageWithURL(MYIMAGEURL
, placeholderImage: nil
, options: SDWebImageOptions.RetryFailed
, progress: {(receivedSize: Int!, expectedSize: Int!) in
}
, completed:{(image: UIImage?, error: NSError?, cacheType: SDImageCacheType!, imageURL: NSURL?) in
if image {
UIView.transitionWithView(self.imageView
, duration: 0.3
, options: UIViewAnimationOptions.AllowUserInteraction | UIViewAnimationOptions.TransitionCrossDissolve
, animations: {
}
, completion: {(finished) in
})
}
})
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 37 (6 by maintainers)
Thanks @lubert, thats it! Many thanks for this workaround. Just have to call like this