[英]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.