Answers for "uicollectionview get first 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 "uicollectionview get first visible cells"

Code answers related to "Swift"

Browse Popular Code Answers by Language