獲取cell 在collection view 中的位置

1  //求得出點擊的cell在當前View的位置
2 UICollectionViewLayoutAttributes *attributes = [collectionView layoutAttributesForItemAtIndexPath:indexPath];
3 
4 CGPoint cellCenter = attributes.center;
5 CGPoint anchorPoint = [collectionView convertPoint:cellCenter toView:self.view];
相關文章
相關標籤/搜索