📌  相关文章
📜  如何在swift代码示例中获取当前显示的collectionview单元格索引

📅  最后修改于: 2022-03-11 15:00:58.205000             🧑  作者: Mango

代码示例2
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
    for cell in yourCollectionView.visibleCells {
        let indexPath = yourCollectionView.indexPath(for: cell)
        print(indexPath)
    }
}