我花了整整14个小时,试图处理一个来自SDWebImage的问题。在我下载了Xcode7之后,他告诉我将我的代码更新到Swift 2,这些调用停止工作:
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下载原始图像。
你们能帮我吗?
谢谢



发布于 2015-10-14 02:23:21
自从iOS9发布以来,我们也遇到了类似的问题。如果其他人找到了答案,我很乐意听到他们的回答。
我确实注意到SDWebImage报告了iOS 9的几个错误,包括这个与缓存相关的错误:
https://stackoverflow.com/questions/32675319
复制相似问题