This isn\'t so much a question as an explanation of how to solve this problem.
The first thing to realize is that the UICollectionView
does inherit from a <
-(void)collectionView:(UICollectionView *)cv didSelectItemAtIndexPath:(NSIndexPath *)indexPath;
{
UICollectionViewLayoutAttributes *attributes = [cv layoutAttributesForItemAtIndexPath:indexPath];
CGRect cellRect = attributes.frame;
CGRect cellFrameInSuperview = [cv convertRect:cellRect toView:[cv superview]];
NSLog(@"%f",cellFrameInSuperview.origin.x);
}
It work for me.You can try yourself