I've been trying for hours but I do not understand how I hope someone can help me!

In practice I have an initial VC I click on an image that takes me to a collectionView through a follow and the 2 elements are also joined by a NC.

In the CollectionView are inserted images, which are contained in an array, I would like to touch on an image to return to the initial VC and that the image displayed is the one selected in the CollectionView.

I tried with UnWind but I can not carry the information of the image index that I try to recover in the didselct.

Viewcontroller

```
class ViewController: UIViewController {

    @IBOutlet weak var immagine: UIImageView!

    @IBAction func actionTap(_ sender: UITapGestureRecognizer) {
        print("tap")
        performSegue(withIdentifier: "selezione", sender: nil)
    }

    @IBAction func indietro(segue: UIStoryboardSegue){

        let recupero = segue.source as! CollectionViewController
        print(recupero.indice)

        immagine.image = UIImage(named: recupero.arrayImmagini[recupero.indice])
    }

    private let reuseIdentifier = "Cell"

    ...
}

```

CollectionViewController

```
class CollectionViewController: UICollectionViewController {

    var arrayImmagini = ["globe","bed","home","toolbox"]
    var indice = 0

    override func numberOfSections(in collectionView: UICollectionView) -> Int {
        return 1
    }

    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return arrayImmagini.count
    }

    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! CollectionViewCell
        cell.imgCell.image = UIImage(named: arrayImmagini[indexPath.row])
        return cell
    }

    override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        //   print(arrayImmagini[indexPath.row])
        let indice = indexPath.row
        //   idImg = indexPath.row
    }

    ...
}

```

even if set index = indexPath.row it is never recovered in the unwind