UICollectionView didSelectItemAtIndexPath not called when tapped on UITextView
I would suggest to use UIGestureRecognizer
for each cell and when it taped to send it to UITextView
or whatever , perhaps there maybe a better solutions , but I would use this 1 because of simplicity reasons.
didSelectItemAtIndexPath
is called when none of the subView of collectionViewCell respond to that touch
. As the textView
respond to those touches, so it won't forward those touches
to its superView, so collectionView won't get it.
override hitTest:withEvent
method of your collectionViewCell
or CollectionView
subclass and always return self
from them.so it explicitly makes collectionView as first responder
.