Ok, I understood what was going on.
I added a new UITapGestureRecognizer to my UICollectionView. Implementing this, as it led me to the solution:
- (void)cellSingleTap:(UITapGestureRecognizer *)sender { CGPoint point = [sender locationInView:collectionView_]; NSIndexPath *indexPath = [collectionView_ indexPathForItemAtPoint:point]; [ .... ] }
When I checked the points returned when I got the selection, but there was no choice, it became obvious that this happened when the point clicked on it was within the sectional attachments of the collection view layout. And when the taps were on the section inserts, calls to indexPathForItemAtPoint returned zero.
Thus, basically, a collection view will highlight, but not select, taps that are outside the cells but are inside its sections. As long as the outputs are outside the cells and not inside the insert, these taps will result in didSelectItemAtIndexPath calls.
Since I would like the taps inside the inserts to be considered labels on the cells, I was able to solve this problem by adjusting the connection points before my call to indexPathForItemAtPoint.
source share