didSelectItemAtIndexPath 并不总是在 UICollectionView 中的第一个元素上调用

didSelectItemAtIndexPath not always called on first element in UICollectionView

我有一个集合视图,点击我的 UICollectionView 的第一个元素似乎是命中注定(主要是未命中),即回调 didSelectItemAtIndexPath 没有被调用。

只影响我的第一个元素 而且我从我的 UICollectionView 中选择任何其他单元格都没有问题?我的 UICollectionView 使用 CustomCells.

有什么想法吗? 谢谢!

我想通了。我没有调整我的 UICollectionView header 的大小,因此它位于第一个单元格上方并吸收了触摸。