Here is my code, i am trying to use the \"prepareForSegue\" function to send an image from tableViewController (firstViewController) to my detailedViewController (secondViewCont
Hers the save code i think you wanted to see...
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let myCell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! EventsCell
postedImages[indexPath.row].getDataInBackgroundWithBlock { (data, error) -> Void in
if let downloadedImage = UIImage(data: data!) {
myCell.postedEventImage.image = downloadedImage
}
}
myCell.eventName.text = postedEvents[indexPath.row]
myCell.eventStart.text = postedStart[indexPath.row]
myCell.eventPrice.text = postedPrices[indexPath.row]
return myCell
}
and then there is also this code on how i append to my postImages array
if let objects = objects {
for object in objects {
self.postedImages.append(object.objectForKey("Image") as! PFFile)
self.tableView.reloadData()
}