我运行过程中出现我自己的解析服务器和所有工作正常,但 我无法将PFFile转换为一个UIImage解析加载图像,这是它抛出在我的错误:雨燕3.0
Cannot convert value of type '(NSData?, NSError?) -> Void' to expected argument type PFDataResultBlock'
这里是我使用的代码:
var imageFromParse = object.object(forKey: "ProfilePicture") as! PFFile!
imageFromParse!.getDataInBackgroundWithBlock({ (imageData: NSData?, error: NSError?) -> Void in
var image: UIImage! = UIImage(data: imageData!)!
})
而这一切都用于Swift 2.3中的完美工作。 感谢您的帮助。
它甚至不会允许我使用'findObjectsInBackgroundWithBlock' xcode将其更改为'findObjectsInBackground'这真的很奇怪,您使用的是最新的解析SDK吗? –
是的我通过cocoapods添加了解析 –
奇怪,因为它已被重命名为'findObjectsInBackground(block:)',但我找不到任何文件来处理这个... –