I have a parse backend, and I am putting at the rows into an array in swift, and then displaying them in a tableview. All the labels are fine and I am having trouble with an Image column (PFFile).
Here is my code to retrieve the data and place into an array
var GetAllEvents : PFQuery = PFQuery(className: "Types_")
GetAllEvents.findObjectsInBackgroundWithBlock{
(objects:[AnyObject]!, error:NSError!) ->Void in
if (error == nil) {
for object in objects {
self.EventData.addObject(object)
println(object)
self.tableView.reloadData()
}
Then I retrieve the content in cellforindexpath , like this :
cell.EventTitle.text = (event.objectForKey("Title") as String!)
cell.EventType.text = (event.objectForKey("TypeOfVenue_") as String!)
I am having trouble with the image , I have written this :
cell.TypeImage.image = (event.objectForKey("TyoeImage") as PFFile)
but as UIImage is not a PFFile, it shows an error. Whats the best way to display this image ?
thanks