Answers for "index of the top cell in uicollectionview in swift"

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 "index of the top cell in uicollectionview in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language