how to get indexPath for cell which is located in the center of UICollectionView
Like you did yourself, indexPathForItemAtPoint
is a good way of finding the index path of the element you're interested in. If your question is: how do i know the coordinates of this point? Then you should try with (using the same name you gave it in your code snippet):
initialPinchPoint = CGPointMake(self.collectionView.center.x + self.collectionView.contentOffset.x,
self.collectionView.center.y + self.collectionView.contentOffset.y);
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")
}