如果我在已完成的块中使用"self“,它就会崩溃。
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
})
}
})发布于 2014-07-25 05:48:12
SDWebImageModule是一个积极开发的开源组件。在这种情况下,在GitHub上引发一个bug要好得多。开发人员已经发布了一些修正Xcode6和Swift问题版本。
https://stackoverflow.com/questions/24948480
复制相似问题