Swift UiCollectionViewCell Comment savoir quand

func collectionView(_ collectionView: UICollectionView,
                 didEndDisplaying cell: UICollectionViewCell,
                   forItemAt indexPath: IndexPath) {
    if let cell = collectionView.cellForItem(at: indexPath) {
      // Do something
    }
  }
TheKrisinator