简体   繁体   English

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

[英]didSelectItemAtIndexPath not always called on first element in UICollectionView

I have a collection view and the tap on the first element of my UICollectionView seems to be hit and miss (mostly misses) ie the callback didSelectItemAtIndexPath does not get called. 我有一个集合视图,在UICollectionView的第一个元素上的点击似乎被击中(未命中)(即未命中),即未调用回调didSelectItemAtIndexPath

This only affects my first element and I have no problems selecting any other cells from my UICollectionView ? 只会影响我的第一个元素,并且从UICollectionView选择其他任何单元都没有问题吗? My UICollectionView makes use of CustomCells . 我的UICollectionView使用CustomCells

Any ideas? 有任何想法吗? Thanks! 谢谢!

I figured it out. 我想到了。 I wasn't resizing my UICollectionView header which was thus siting above the first cell and absorbing the touches. 我没有调整UICollectionView标头的大小,因此它位于第一个单元格上方并吸收了触摸。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未调用 UICollectionView 的 didSelectItemAtIndexPath - didSelectItemAtIndexPath of UICollectionView is not called UICollectionView的didSelectItemAtIndexPath方法仅被调用一次 - UICollectionView's didSelectItemAtIndexPath method is called only once 在 UITextView 上点击时未调用 UICollectionView didSelectItemAtIndexPath - UICollectionView didSelectItemAtIndexPath not called when tapped on UITextView UICollectionView:在使用其他手势后未调用didSelectItemAtIndexPath - UICollectionView: didSelectItemAtIndexPath not called after other gestures are used 在UITableviewCell中使用UICollection视图时,未调用UICollectionView委托方法“ didSelectItemAtIndexPath” - UICollectionView delegate method “didSelectItemAtIndexPath” not called when UICollection view used in UITableviewCell 即使设置了委托,UICollectionView didSelectItemAtIndexPath也不会调用 - UICollectionView didSelectItemAtIndexPath never called even though delegate is set UICollectionView的didSelectItemAtIndexPath仅在用两根手指选择单元格时调用 - UICollectionView's didSelectItemAtIndexPath only called when selecting cell with two fingers UICollectionView不调用didSelectItemAtIndexPath - UICollectionView not calling didSelectItemAtIndexPath UICollectionView didSelectItemAtIndexPath滚动 - UICollectionView didSelectItemAtIndexPath Scrolling didSelectItemAtIndexPath方法不在UICollectionView中工作 - didSelectItemAtIndexPath method not working in a UICollectionView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM