How can i find indexPath for cell in the middle of UICollectionView?
indexPath
cell
UICollectionView
I have horizontal scrolling and only one big cell<
cell<
Here's what I did in Swift 3
private func findCenterIndex() { let center = self.view.convert(self.collectionView.center, to: self.collectionView) let index = collectionView!.indexPathForItem(at: center) print(index ?? "index not found") }