Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift uicollectionviewcell how to know when off screen

func collectionView(_ collectionView: UICollectionView,
                 didEndDisplaying cell: UICollectionViewCell,
                   forItemAt indexPath: IndexPath) {
    if let cell = collectionView.cellForItem(at: indexPath) {
      // Do something
    }
  }
 
PREVIOUS NEXT
Tagged: #swift #uicollectionviewcell #screen
ADD COMMENT
Topic
Name
9+4 =