Answers for "collection view index paths for visible cells"

1

how to get current shown collectionview cell index in swift

func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
    for cell in yourCollectionView.visibleCells {
        let indexPath = yourCollectionView.indexPath(for: cell)
        print(indexPath)
    }
}
Posted by: Guest on March-24-2020

Code answers related to "collection view index paths for visible cells"

Code answers related to "Swift"

Browse Popular Code Answers by Language