📜  swift uicollectionviewcell 如何知道何时离开屏幕 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.439000             🧑  作者: Mango

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