UICollectionView only calling didSelectItemAtIndexPath if user double taps, will not call when user single taps

前端 未结 14 1666
名媛妹妹
名媛妹妹 2020-12-07 18:58

I have a UICollectionView which is about the size of the screen. The UICollectionViewCells that it displays are the same size as the collectionView. Each cell has a UIImage

14条回答
  •  鱼传尺愫
    2020-12-07 19:24

    If you have a view on the cell which obstructs the cells content view that is intractable then you will not be able to hook into the delegate callback for the cell.

    You will want to disable user interaction on the obstructing view either in the NIB or in the code.

    view.userInteractionEnabled = NO;

提交回复
热议问题