是否可以将UICollectionViewCell's坐标从相对于UICollectionView转换为相对于superview?到目前为止,UICollectionViewCell's当触摸到superview. 这是我到目前为止所尝试的:
- (void)collectionView:(UICollectionView *)collectionView
didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell =
[collectionView dequeueReusableCellWithReuseIdentifier:@"CollectionViewCell"
forIndexPath:indexPath];
CGRect frame = CGRectMake(0.0,
0.0,
cell.frame.size.width,
cell.frame.size.height);
frame.origin = [cell convertPoint:cell.frame.origin
toView:self.view];
}
我想创建一个新框架,该框架源自视图上单元格的位置,而不是UICollectionView. 任何帮助都会非常感谢。