UICollectionView didSelectItemAtIndexPath not called when tapped on UITextView

前端 未结 6 1524
傲寒
傲寒 2021-02-13 05:13

I have a UICollectionView with custom cells- They have a UITextView that mostly covers the entire cell. This presents a problem when using didSel

6条回答
  •  无人共我
    2021-02-13 05:51

    Do you override touchesEnded: withEvent: ?

    I had the same problem today and I found that I have some customised logic in touchesEnded in one of collectionview's container views, and I didn't call

     [super touchesEnded: withEvent:]
    

    when I'm done with my customised logic in touchesEnded.

    After adding the super call, everything is fine.

提交回复
热议问题