I have a custom UICollection View Cell. One of that cell's property's is cellImageView. When the user selects a cell, I want to pass the image from that view (cellImageView.image) to the next one. Here's what I've tried:
if let indexPath = self.collectionView?.indexPathForCell(sender as! UICollectionViewCell)
{
if segue.identifier == "show"
{
var segue = segue.destinationViewController as! ViewPhoto
segue.imageURL = URLToPass
}
}
but quickly realized that's the wrong route to take. What's the best way to go about doing this? Thanks in advance.