title: swift pass images from collection view controller to another view controller
body: <p>i have downloaded set of users photo from firebase and view it as collection view (instagram like) 
  but im trying to enlarge the photo clicked in another view controller using segue but its not working. 
  Any  thoughts about my code:</p>
  
  <pre><code>class ProfileViewController: UIViewController{
      var photoThumbnail: UIImage! 
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
          let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collection_cell", for: indexPath) as! ProfileCollectionViewCell
          cell.imageCollection.downloadImage2(from: currPosts[indexPath.row].photoUrl)
          cell.imageCollection.image = photoThumbnail
          return cell
      }
  
      func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
          performSegue(withIdentifier: "photoViewSegue", sender: nil)
      }
  
      override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
          var destViewController : EnlargePhotoViewController = segue.destination as! EnlargePhotoViewController
          destViewController.labelText = "test"  //**** this works
          destViewController.myImage = photoThumbnail //**** this doesnt work 
      }
  
  }
  </code></pre>
  
  <p>and the collection view cell is:</p>
  
  <pre><code>class ProfileCollectionViewCell: UICollectionViewCell {
      @IBOutlet weak var imageCollection: UIImageView!
  
  }
  </code></pre>
  
  <p>lastly the target viewController:</p>
  
  <pre><code>class EnlargePhotoViewController: UIViewController {
  
          @IBOutlet weak var myLabel: UILabel!
          @IBOutlet weak var enlargedPhoto: UIImageView!
  
          var labelText = String()
          var myImage: UIImage!
  
          override func viewDidLoad() {
              super.viewDidLoad()
  
             myLabel.text = labelText
              enlargedPhoto.image = myImage
          }
      }
  </code></pre>