Skip to content

Instantly share code, notes, and snippets.

@decoyfox
Created May 2, 2016 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save decoyfox/e3342a2fd234508f8ef5ac57cd110cec to your computer and use it in GitHub Desktop.
Save decoyfox/e3342a2fd234508f8ef5ac57cd110cec to your computer and use it in GitHub Desktop.
//the user is searching for an ITEM
let title = returnedItemArray[indexPath.row]["title"] as! String
let description = returnedItemArray[indexPath.row]["description"] as! String
myCell.topLabel.text = title
myCell.bottomLabel.text = description
let downloadedItemThumbnailImage = returnedItemArray[indexPath.row]["thumbnailImage"] as! PFFile
downloadedItemThumbnailImage.getDataInBackgroundWithBlock({ (data, error) in
if let theImage = UIImage(data: data!) {
dispatch_async(dispatch_get_main_queue(),{
myCell.imageView?.image = theImage
myCell.imageView!.layer.cornerRadius = 30
//myCell.imageView!.clipsToBounds = true
myCell.imageView!.layer.masksToBounds = true
myCell.setNeedsLayout()
})
}
})
}
return myCell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment