我有一个PFQueryTableView
的PFImageViews。我正在尝试按照本教程懒洋洋地加载图像:http://blog.parse.com/learn/engineering/loading-remote-images-in-a-table-view/
这是cellForRowAtIndexPath
let imageWillUse = object!["Image"] as! PFFile
var imageToLoad = UIImage()
do {
try imageToLoad = UIImage(data:imageWillUse.getData())!
} catch {
print(error)
}
cell.postImageView.file = imageToLoad
现在,按照教程,我改为使用此代码
let image: PFFile = object!["Image"] as! PFFile
cell.postImageView.file = image //error on this line
当我尝试运行时,Xcode会报告[UIImageView setFile:]: unrecognized selector sent to instance
。我需要改变什么?