SDWebImage在Swift2之后停止

问题描述:

我花了14个小时,尝试处理来自SDWebImage的问题。我下载的Xcode 7后,他告诉我更新的代码斯威夫特2,这些调用停止工作:SDWebImage在Swift2之后停止

let profilePhotoThumb = user["profilePhotoThumbnail"] as? PFFile 
    let gender = user["gender"] as! String 
    if profilePhotoThumb != nil { 
     let imageUrl = NSURL(string: (user["profilePhotoThumbnail"] as! PFFile).url!) 
     cell.imageAvatar.sd_setImageWithURL(imageUrl, placeholderImage: ProfileHelpers().loadImageAccordingToGender(gender)) 
    } else { 
     cell.imageAvatar.image = ProfileHelpers().loadImageAccordingToGender(gender) 
    } 

你怎么可以在我的屏幕芽看到,一个奇怪的现象发生了:首先,当收集视图在屏幕上加载时,布局破裂,没有占位符图像。然后当我向下滚动时,我可以看到一些占位符图像,然后当我再次滚动时,所有占位符都到位!

其次,是只有占位符图像显示。该应用程序不会尝试从Parse下载原始图像。

你能帮助我吗?

感谢

At first, the placeholder is missing

Then when I scroll down, the last cells shows the image placeholders

And then, when i scroll up again, the placeholders are showing, but without download the images from Parse

+0

您是否尝试过禁用的iOS ATS? –

+0

@KenBoreham我现在已经禁用了,但行为仍然相同= / –

我们有自启动iOS9的类似问题。如果其他人发现答案会喜欢听到他们。

我注意到,SDWebImage是报告与iOS 9包括这一个关系到缓存的几个误区:

https://github.com/rs/SDWebImage/issues/1314