Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

UICollectionView current visible cell index

let visibleRect = CGRect(origin: collectionView.contentOffset, size: collectionView.bounds.size)
let visiblePoint = CGPoint(x: visibleRect.midX, y: visibleRect.midY)
let visibleIndexPath = collectionView.indexPathForItem(at: visiblePoint)
 
PREVIOUS NEXT
Tagged: #UICollectionView #current #visible #cell #index
ADD COMMENT
Topic
Name
7+4 =