获取cell 在collection view 中的位置

//求得出点击的cell在当前View的位置
UICollectionViewLayoutAttributes *attributes = [collectionView layoutAttributesForItemAtIndexPath:indexPath];
 
CGPoint cellCenter = attributes.center;
CGPoint anchorPoint = [collectionView convertPoint:cellCenter toView:self.view];
Table of Contents