Swift UicollectionViewCell Jak wiedzieć, kiedy poza ekranem

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