indexPath只要不为0就是
CGPoint tapPoint = [gesture locationInView: _collectionView];
NSIndexPath *indexPath = [_collectionView indexPathForItemAtPoint: tapPoint];
判断点击点是不是在UICollectionView中的cell上
UICollectionView点击位置获取
最新推荐文章于 2019-06-20 19:50:44 发布
本文介绍如何在UICollectionView中通过手势识别点击位置,并转换该位置到视图坐标系下,进而获取被点击项的indexPath。
4495

被折叠的 条评论
为什么被折叠?



