我正在尝试从类似于此问题的解析中获取图像
iOS - 在 UIImageView 中从 Parse 检索并显示图像(Swift 1.2 错误)
func fetchDataEmployer(){
self.companyNameLabel.text = (PFUser.currentUser()?.objectForKey("companyName")?.capitalizedString)! as String
//MARK: - FETCHING IMAGE FILE FROM PARSE
if let companyImage = PFUser.currentUser()?["profileImageEmployer"] as? PFFile {
companyImage.getDataInBackgroundWithBlock({ ( imageData: NSData?, error: NSError?) -> Void in
if error == nil{
self.profileEmployerImage.image = UIImage(data: imageData!)
} else {
print("No image found")
}
})
}
}
它一直返回零