将PFFile转换为UIImage的步骤是什么?
我设法从解析中获得了作为PFFile的映像。但是我不能向用户显示视图,因为它不是UIImage。
有人能指点我吗?
我一直在
error: [UIImageView setFile:]: unrecognized selector sent to instance 0x7ff2937a9bd0 on the console每当我试图从解析中获取图像文件并将其设置为UIImage时
下面是将文件设置为UIImageView的代码
var initialThumbnail = UIImage(named: "AppIcon")
cell.customImage.image = initialThumbnail
if let picture = object?["image"] as? PFFile {
cell.customImage.file = picture
cell.customImage.loadInBackground()
}这是customImage插座的代码
@IBOutlet weak var customImage: PFImageView!其他数据加载得很好,但唯一的问题是文件数据。
发布于 2015-05-19 05:47:22
我怀疑ImageView的班级是UIImageView而不是PFImageView.
选择你的imageView,到身份检查员那里,它一定是这样出现的.

应该是这个..。

因为PFImageView理解属性“file”的getter和setter方法。
https://stackoverflow.com/questions/30317367
复制相似问题