I have an class in Parse which has been put into an array, like this :
// PFQuery to get all Events
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()
}
}else
{
println("Error \(error)")
}
}
I am trying to put the results into a tableview, and this is fine with the strings , but with the image I am really struggling.
cell.EventTitle.text = (event.objectForKey("Title") as String!)
cell.EventType.text = (event.objectForKey("TypeOfVenue_") as String!)
var image = UIImage(data: (event.objectForKey("TypeImage"))! as NSData)
So when i try and create an variable for the image - it just crashes, any ideas ?